سؤال

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.

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top