I decode an object with NSKeyedArchiver (SecureCoding):
typealias BoolArray = Array<Array<Bool>>
let val = decoder.decodeObject(of: NSArray.self, forKey: someKey) as? BoolArray
I get the following 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.
I changed by adding NSNumber.self in the list :
let val = decoder.decodeObject(of: [NSArray.self, NSNumber.self], forKey: someKey) as? BoolArray
No more warning in log.
Is there a reason for this ?