NSUserDefaults setObject forKey causing exception in ios7
-
19-10-2022 - |
Question
I was trying to save a NSString
to NSUserDefaults
. Its working fine in iOS6
,iOS5
versions. But in iOS7
its crashing with a message
[NSUserDefaults setObject:forKey:]: attempt to insert non-property list object
NSUserDefaults *missedValues=[NSUserDefaults standardUserDefaults];
NSMutableDictionary *temp=[[NSMutableDictionary alloc]init];
[temp setObject:name forKey:@"missedName"] ;
[missedValues setObject:temp forKey:@"missed"];
[missedValues synchronize];
An exception is thrown when setObject method is called. How can this be fixed ? The issue is only with iOS7
.
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow