I have an array containing either:
- Nothing
- Only one string object
- Several custom objects
- A string AND several custom objects
to NSUserDefaults
.
Short background about this:
I have a core data relationsship between two objects. So any object of Entity A can belong to a category contained in Entity B or belong to no category. I have a search window where you can look of course for specific categories and/or objects that belong to no category. This no category I basically save in my filter array as a specific string.
But I always get the error:
Attempt to insert non-property list object.
This is as far as I have researched now because of my custom objects. But can I also store in this array the string and mix the object types? I also thought about assigning to every object a default category but I think it is cleaner with no category and just work around with this string at the only place where I need it, when using the filter within my app.