Reputation: 701
I made a mac application to pre-populate the database for my iPhone application. Basically I followed the traditional method of saving a .sqllite file and then replacing it in the Application Support. That works, but the problem is with the mac application . It just builds and runs for one time. The next time when I Build and Run and click on "Add" to add a record, it says in the console: "Core Data: Failed to create new object".
What could be the problem?
Thanks
Upvotes: 1
Views: 453
Reputation: 701
Problem Solved. The iPhone project mine of had the custom classes declared for the data model. And since I was using the same data model in my mac application, I needed to import the custom class and it's implementation into the mac application as well.
Upvotes: 1