문제

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