mirror of
https://github.com/zhigang1992/facebook-ios-sdk.git
synced 2026-01-12 17:22:28 +08:00
Fix a few NSKeyedUnarchiver validateAllowedClass Warnings in Xcode Console
Summary: Running the tests no longer shows these warnings. Fixed the following warnings when running FBSDKAppEventsStateManagerTests.testPersistingValidState and FBSDKAppEventsTests.testFetchingConfigurationIncludingCertainFeatures ``` Attempted to decode a collection type 'NSString' (subclass of 'NSObject') for key 'NS.keys'. 'NSString' requires its subclasses to be explicitly added to the allowed classes list but it is not present. allowed unarchiving safe plist type ''NSNumber' (0x7fff863021c8) [/Applications/Xcode_13.0.0_fb.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/Foundation.framework]' for key 'NS.objects', even though it was not explicitly included in the client allowed classes set ``` Reviewed By: joesus Differential Revision: D32606181 fbshipit-source-id: e095005a1904c9b1996df0c3c0ea96482def88de
This commit is contained in:
committed by
Facebook GitHub Bot
parent
34cf89b3f6
commit
a38207417b
@@ -68,7 +68,7 @@ static NSArray<id<FBSDKEventsProcessing>> *_eventProcessors;
|
||||
NSString *appID = [decoder decodeObjectOfClass:NSString.class forKey:FBSDK_APPEVENTSSTATE_APPID_KEY];
|
||||
NSString *tokenString = [decoder decodeObjectOfClass:NSString.class forKey:FBSDK_APPEVENTSSTATE_TOKENSTRING_KEY];
|
||||
NSArray *events = [FBSDKTypeUtility arrayValue:[decoder decodeObjectOfClasses:
|
||||
[NSSet setWithArray:@[NSArray.class, NSDictionary.class]]
|
||||
[NSSet setWithArray:@[NSArray.class, NSDictionary.class, NSString.class, NSNumber.class]]
|
||||
forKey:FBSDK_APPEVENTSSTATE_EVENTS_KEY]];
|
||||
NSUInteger numSkipped = [[decoder decodeObjectOfClass:NSNumber.class forKey:FBSDK_APPEVENTSSTATE_NUMSKIPPED_KEY] unsignedIntegerValue];
|
||||
|
||||
|
||||
@@ -474,6 +474,7 @@ static char *const dispatchQueueLabel = "com.facebook.appevents.AEM.FBAEMReporte
|
||||
NSSet<Class> *classes = [NSSet setWithArray:@[
|
||||
NSMutableDictionary.class,
|
||||
NSMutableArray.class,
|
||||
NSString.class,
|
||||
FBAEMConfiguration.class,
|
||||
FBAEMRule.class,
|
||||
FBAEMEvent.class]];
|
||||
|
||||
Reference in New Issue
Block a user