I have an application that utilizes Core Data for data persistence. My application is comprised of (4) Navigation Controllers inside a TabBarController. The Navigation Controller's root view controller is a UITableView Controller and when you select a cell it displays a Detail view controller in each case. I wanted the main application to be static so the user cannot edit the data and my update would be made using a separate application that I would use to update the data and then put out a new version.
I have completed the data applications and it successfully saves the data and I can call it back up to display and all appears well. I have also looked at the data with a SQlite Data browser to make certain it is all good.
I then take the populated .sqlit file and place it in the documents directory of the main application and make sure the names match see below:
NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"RoundTopApp.sqlite"];
After doing this and then running the application, I get the following error:
'+entityForName: could not locate an NSManagedObjectModel for entity name 'Place''
I have added the code below to note that I am using the NSFetchedResultsController to perform the fetch.
(void)viewDidLoad { [super viewDidLoad];
NSError *error; if (![[self fetchedResultsController] performFetch:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); exit(-1); // Fail }
self.title = @"Lodging"; }
I am not sure what is wrong here other than I have failed to add it to the application bundle or something.
Any help would be appreciated.
Hudson