Coredata model version recognition issue for a new target

Hi,


I have a project which has datamodel (Coredata) and currently it is versioned (modified the datamodel). The base target works as expected in all the new coredata classes. Now I am trying to build new target with just one variables changed (no data morel or logic change). I used the DUPLICATE the target approach in the project info screens and created new target based on the current default target, renamed in manage scheme screen. Build was succesful and app worked ok until it hits the area where the new classes are referenced. At this time, the app stuck with the following message:



CoreData: warning: Unable to load class named <Newclass in datamodel> for entity 'NAVDetailedResults'. Class not found, using default NSManagedObject instead


Same codebase (with no change at all), if I build for base target, the app works fine and no error. Looks like the new target is still linking at older version of the datamodel. I was trying to find whether we link the datamodel version explicitly in the build settings and if so where. But I could not find this settings. Can you please help me in this issue?


Thanks

I have fixed this issue. Looks like when the data model is changed, the new coredata entities are tagged with base target name. I moved that to Current Product Name. Works fine now.

Coredata model version recognition issue for a new target
 
 
Q