- I am trying to add a today extension to my app.
My app includes a cocoaPod (our own cocoapod) which sets up the core data model for our app.
I setup the today extension to use our pod.
On running the today extension target, I get an error for this line.
NSManagedObjectModel *managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"MyModel" withExtension:@"momd"]];
The error is that [[NSBundle mainBundle] URLForResource:@"MyModel" withExtension:@"momd"]
is nil.
I have set up the group for the app and the extension in the developer store. Wonder why it cannot find the data model in the app bundle?
-- Thanks