I have this app I have been working on for a while, that I created using CoreData. However, I have recently started building a data model and working with CoreData. Now that I have done this, whenever I run the app in the simulator, it crashes in the App Delegate / didFinishLaunchingWithOptions on the first line:
self.window.rootViewController = self.navigationController;
The crash is:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'executeFetchRequest:error: A fetch request must have an entity.'
If I comment out that line, it runs. Strange! I haven't done any work with CoreData at this point in the code yet - so no fetches yet. Perhaps there is some system fetch, because the data model changed? I have deleted the app from the Simulator and done a Clean/Build, but the issue persists.
First Question: How do I fix the error?
Second Question: Is this a problem, can I just ignore setting the rootViewController?
Third Question: Why is it failing now?