Store NSMutableArray in NSUserDefaults
I am trying to save NSMutableArray
in the NSUserDefaults
following way but I get the following error.
(lldb) po pOrderElements
<__NSArrayM 0x174256b90>(
{
category = 1;
imagePath = "products/chicken-kabob.png";
name = "Baked Chicken";
price = "5.49";
}
)
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
[userDefaults setObject:pOrderElements forKey:@"tableViewData"];
[userDefaults synchronize];
Application terminated due to uncaught exception "NSInvalidArgumentException", reason: "Attempt to insert a non-proprietary list of objects ({category = 1; id =" "; imagePath =" products / chicken-kabob.png "; name =" Baked chicken " ; price = "5.49";}) for tableViewData '
0
source to share
No one has answered this question yet
See similar questions:
or similar: