I want to save the records in an array and delete them from the CoreData. I have tried using NSCopying but it seems that copyWithZone doesn’t work on NSManagedObject. I am really stuck, any help will be appreciated.
Share
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.
Copy all the field values of your NSManagedObject to an Dictionary, and store these dictionaries in the array.
I’ve put together a small routine that you can implement in a NSMutableObject category that could be used to obtain that.
(please, be aware that I’m not on a Mac computer right now and there might be typos on the code, but other than that, it should work fine).
If you need further clarification, be sure to comment and I’ll answer shortly.