-
Notifications
You must be signed in to change notification settings - Fork 834
Description
Describe the bug
OIDAuthState *authState = [NSKeyedUnarchiver unarchiveObjectWithData:archivedAuthState];
return result of OIDAuthState but this is deprecated and changed to
NSError *errRet1;
OIDAuthState *authState1 = [NSKeyedUnarchiver unarchivedObjectOfClass:[OIDAuthState class]
fromData:archivedAuthState error:&errRet1];
but returns nil
To Reproduce
Steps to reproduce the behavior:
NSError *errRet1;
OIDAuthState *authState1 = [NSKeyedUnarchiver unarchivedObjectOfClass:[OIDAuthState class]
fromData:archivedAuthState error:&errRet1];
Expected behavior
return result of OIDAuthState
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
- Device: iPhone 13, ios sumulators etc
- OS: 14.1.1 (23B8
- Browser:
Additional context
in flie : OIDServiceConfiguration.m
Modified like below but it also not working.
OIDServiceDiscovery *discoveryDocument = [aDecoder decodeObjectOfClass:[OIDServiceDiscovery class] forKey:kDiscoveryDocumentKey];
to
OIDServiceDiscovery *discoveryDocument = [aDecoder decodeObjectOfClasses:[NSSet setWithObjects:[OIDServiceDiscovery class], [NSDictionary class], [NSArray class], nil]
forKey:kDiscoveryDocumentKey];
in flie : OIDServiceDiscovery.m
-
(nullable instancetype)initWithCoder:(NSCoder *)aDecoder {
NSError *error;
NSSet *codingClasses = [NSSet setWithArray:@[ [NSDictionary class],[NSArray class] ]];
NSDictionary *dictionary = [aDecoder decodeObjectOfClasses:codingClasses forKey:kDiscoveryDictionary];
// NSDictionary *dictionary = [[NSDictionary alloc] initWithCoder:aDecoder];
self = [self initWithDictionary:dictionary error:&error];
if (error) {
return nil;
}
return self;
} -
(void)encodeWithCoder:(NSCoder *)aCoder {
[aCoder encodeObject:_discoveryDictionary forKey:kDiscoveryDictionary];
}