"This will be disallowed in the future."

Hi , I got this quote with 5800 repetitions (5.8 MB / 1k) :

`2023-05-25 01:02:59.021733+0200 LookAt[6404:302136] [general] *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber' (0x7ff84cfe02f8) [/System/Library/Frameworks/Foundation.framework]' for key 'NS.objects', even though it was not explicitly included in the client allowed classes set: '{(

"'NSMutableDictionary' (0x7ff84cfb6b48) [/System/Library/Frameworks/CoreFoundation.framework]",
"'NSArray' (0x7ff84cfb68a0) [/System/Library/Frameworks/CoreFoundation.framework]"

)}'. This will be disallowed in the future `


-(IBAction)readFile:(id)sender
{
    NSData * data;
    NSError * error = nil;
    data = [_vrReadWrite readData:kFileComponentA];
   
    NSSet * set = [_vrReadWrite setOfClasses];
    _vrRoot = [NSKeyedUnarchiver unarchivedObjectOfClasses:set
                        fromData:data error:&error];
}```

 I got the expected result, that's fine, but I'm not interested in this future.

Uwe






Answered by galad87 in 754095022

Like the message says, you have to had NSNumber to the set of allowed classes that you pass to NSKeyedUnarchiver.

Accepted Answer

Like the message says, you have to had NSNumber to the set of allowed classes that you pass to NSKeyedUnarchiver.

"This will be disallowed in the future."
 
 
Q