"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






Accepted Reply

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

  • Thank you for translation, I added [NSNumber class] & [NSString class], the system is satisfied. I still do not know what will be disallowed.

Add a Comment

Replies

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

  • Thank you for translation, I added [NSNumber class] & [NSString class], the system is satisfied. I still do not know what will be disallowed.

Add a Comment