I have a NSArrayController bound to NSUserDefaultsController, and the array stores a custom class of mine, which conforms to NSCoding.
It seems like I need NSArchiver, but I can’t quite figure out how to glue it all together
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need a value transformer, which you can specify in the options of the binding. You can use
NSKeyedUnarchiveFromDatato serialize the array to keyed archive data, or make your own custom value transformer to convert the objects in the array to property lists of your own design.