When I complete the Core Data model at the end of Chapter 6 it compiles but if I try to run the app on the iPhone simulator I get an error and the app won't run.
Should the app be capable of running at that point?
The error I get is:
Code:
[Session started at 2011-04-24 17:15:56 -0600.]
2011-04-24 17:15:57.206 Tasks[822:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'executeFetchRequest:error: A fetch request must have an entity.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00fa15a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x010f5313 objc_exception_throw + 44
2 CoreData 0x00ccd05a -[NSManagedObjectContext executeFetchRequest:error:] + 3930
3 CoreData 0x00db08d0 -[NSFetchedResultsController performFetch:] + 1440
4 Tasks 0x0000336a -[RootViewController fetchedResultsController] + 739
5 Tasks 0x00002e01 -[RootViewController numberOfSectionsInTableView:] + 36
6 UIKit 0x004756ff -[UITableViewRowData(UITableViewRowDataPrivate) _updateNumSections] + 111
7 UIKit 0x004753b0 -[UITableViewRowData invalidateAllSections] + 66
8 UIKit 0x0032cd23 -[UITableView(_UITableViewPrivate) _updateRowData] + 113
9 UIKit 0x0032848f -[UITableView numberOfSections] + 39
10 UIKit 0x004c4165 -[UITableViewController viewWillAppear:] + 100
11 Tasks 0x00002b00 -[RootViewController viewWillAppear:] + 67
12 UIKit 0x003789be -[UINavigationController _startTransition:fromViewController:toViewController:] + 858
13 UIKit 0x0037332a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
14 UIKit 0x0048e2e9 -[UILayoutContainerView layoutSubviews] + 226
15 QuartzCore 0x01f41a5a -[CALayer layoutSublayers] + 181
16 QuartzCore 0x01f43ddc CALayerLayoutIfNeeded + 220
17 QuartzCore 0x01ee90b4 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
18 QuartzCore 0x01eea294 _ZN2CA11Transaction6commitEv + 292
19 UIKit 0x002bc9c9 -[UIApplication _reportAppLaunchFinished] + 39
20 UIKit 0x002bce83 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 690
21 UIKit 0x002c7617 -[UIApplication handleEvent:withNewEvent:] + 1533
22 UIKit 0x002bfabf -[UIApplication sendEvent:] + 71
23 UIKit 0x002c4f2e _UIApplicationHandleEvent + 7576
24 GraphicsServices 0x018f9992 PurpleEventCallback + 1550
25 CoreFoundation 0x00f82944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
26 CoreFoundation 0x00ee2cf7 __CFRunLoopDoSource1 + 215
27 CoreFoundation 0x00edff83 __CFRunLoopRun + 979
28 CoreFoundation 0x00edf840 CFRunLoopRunSpecific + 208
29 CoreFoundation 0x00edf761 CFRunLoopRunInMode + 97
30 UIKit 0x002bc7d2 -[UIApplication _run] + 623
31 UIKit 0x002c8c93 UIApplicationMain + 1160
32 Tasks 0x00002164 main + 102
33 Tasks 0x000020f5 start + 53
34 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'