0
votes

I am new to objective C development. In inherited someone else's project.

I see that in his project, he has a folder called Model. In it are the files

Product.h
Product.m
Compatible.h
Compatible.m
Model.h
Model.m
MyProject.xcdatamodeld

A few days ago I created two new files called Warehouse.h and Warehouse.m, following the style of coding I saw in Product.h and Product.m. I also wrote some functions in Model.h and Model.m that helped me grab new Warehouses. I then created a new Entity in MyProject.xcdatamodeld by opening that file up in XCode, clicking Add Entity, renaming the entity and adding the necessary attributes.

I was able to use this new class/model in the rest of my project.

Today, i decided to add some new properties to my Warehouse.m. I then added new attributes to the MyProject.xcdatamodeld by clicking on the new attribute buttons.

Now my project crashes right when it starts up, giving me the error Can't find model for source store.

Am I doing something wrong? I vaguely remember someone telling me it's a headache of the model changes. Can someone recommend me reading on the subject matter? And how i can fix my situation?

1

1 Answers

0
votes

I went to MyProject.xcdatamodeld. Then clicked on "Configuration" in the left navigation. Then I noticed a table showed up with the following contents:

Entity      Abstract        Class
Compatible  un-checkbox     Compatible
Product     un-checkbox     Product
Warehouse   un-checkbox

I noticed that the Warehouse row didn't have a value for Class. So i typed in Warehouse in to it. Then everything worked.