Thanks Albert for replying.
Is it an array where you use NSKeyedUnarchiver validateAllowedClass:forKey:?
I have a lot of classes with SecureCoding, and I cannot find from the warning in the log where it comes from.
What is surprising is that I have commented out all the NSNumber.self in any list of decoder.decodeObject(of:, key:) like
if let format = decoder.decodeObject(of: [NSArray.self/*, NSNumber.self*/], forKey: formatKey) as? [[Int]] {
And still get the log.
*** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber' (0x204cdbeb8) [/System/Library/Frameworks/Foundation.framework]' for key 'NS.objects', even though it was not explicitly included in the client allowed classes set: '{(
"'NSArray' (0x204cd5598) [/System/Library/Frameworks/CoreFoundation.framework]"
)}'. This will be disallowed in the future.
*** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber' (0x204cdbeb8) [/System/Library/Frameworks/Foundation.framework]' for key 'NS.objects', even though it was not explicitly included in the client allowed classes set: '{(
"'NSArray' (0x204cd5598) [/System/Library/Frameworks/CoreFoundation.framework]"
)}'. This will be disallowed in the future.
So the questions:
does the alert ask to include NSNumber.self in some decoder.decodeObject(of:) ?
How can I find where the message triggers ?
I will try to locate by setting breakpoints at decoder.decodeObject(of:, key:) calls, but there maybe a simpler way ?
PS: this new API for secure coding makes it really difficult. It would be great if Xcode could propose the list of Types to include in decoder.decodeObject(of:, key:).