-[__NSCFDictionary setObject:forKey:]: mutating method sent to immutable object' 解决方法

-[__NSCFDictionary setObject:forKey:]: mutating method sent to immutable object' 解决方法:
错误:NSMutableDictionaryd =[[[NSUserDefaults standardUserDefaults] objectForKey:@"xxxx"] mutableCopy];
修改:NSMutableDictionary
d =[NSMutableDictionary dictionaryWithDictionary:[[NSUserDefaults standardUserDefaults]ValueForKey:@"xxxx"]];

原文地址:https://www.cnblogs.com/yate1996/p/4730482.html