Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID
Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.

Core Data Difficulties

HappySliceHappySlice Posts: 1New Users
edited September 2010 in iPhone SDK Development
I made a slightly altered version of apple's "iPhoneCoreDataRecipes" example:

https://developer.apple.com/library/ios/#samplecode/iPhoneCoreDataRecipes/Introduction/Intro.html

I only changed the names of the model classes and the names of some of the attributes, for it to make more sense in the type of app I am making.

When I run the app, though, it crashes on start up, and the debugger window says the following:


[Session started at 2010-09-23 00:21:37 -0700.]
2010-09-23 00:21:40.688 PocketPUA[15524:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+entityForName: could not locate an NSManagedObjectModel for entity name 'Set''
*** Call stack at first throw:
(
0 CoreFoundation 0x02677919 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x0248c5de objc_exception_throw + 47
2 CoreData 0x022a025b +[NSEntityDescription entityForName:inManagedObjectContext:] + 187
3 PocketPUA 0x00003435 -[SetListTableViewController fetchedResultsController] + 158
4 PocketPUA 0x00002d1b -[SetListTableViewController viewDidLoad] + 365
5 UIKit 0x00373c26 -[UIViewController view] + 179
6 UIKit 0x00372050 -[UIViewController contentScrollView] + 42
7 UIKit 0x00381df7 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
8 UIKit 0x003804ff -[UINavigationController _layoutViewController:] + 43
9 UIKit 0x00381789 -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
10 UIKit 0x0037c329 -[UINavigationController _startDeferredTransitionIfNeeded] + 266
11 UIKit 0x00497209 -[UILayoutContainerView layoutSubviews] + 226
12 QuartzCore 0x042070d5 -[CALayer layoutSublayers] + 177
13 QuartzCore 0x04206e05 CALayerLayoutIfNeeded + 220
14 QuartzCore 0x0420664c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 302
15 QuartzCore 0x042062b0 _ZN2CA11Transaction6commitEv + 292
16 UIKit 0x002ce63f -[UIApplication _reportAppLaunchFinished] + 39
17 UIKit 0x002cea68 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 545
18 UIKit 0x002d8452 -[UIApplication handleEvent:withNewEvent:] + 1958
19 UIKit 0x002d1074 -[UIApplication sendEvent:] + 71
20 UIKit 0x002d5ac4 _UIApplicationHandleEvent + 7495
21 GraphicsServices 0x02dddafa PurpleEventCallback + 1578
22 CoreFoundation 0x02658dc4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
23 CoreFoundation 0x025b9737 __CFRunLoopDoSource1 + 215
24 CoreFoundation 0x025b69c3 __CFRunLoopRun + 979
25 CoreFoundation 0x025b6280 CFRunLoopRunSpecific + 208
26 CoreFoundation 0x025b61a1 CFRunLoopRunInMode + 97
27 UIKit 0x002ce226 -[UIApplication _run] + 625
28 UIKit 0x002d9b58 UIApplicationMain + 1160
29 PocketPUA 0x00002344 main + 102
30 PocketPUA 0x000022d5 start + 53
31 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'


I have been trying to get Core Data to work for months now. I have implemented persistent data with NSCoding, but it is not nearly as nice as what Core Data does - when it is working.

Could someone please tell me what this error means, point me to a good Core Data tutorial, or a good resource on Core Data?
Post edited by HappySlice on

Replies

  • DhanunjayaDhanunjaya Posts: 105Registered Users
    edited September 2010
    HappySlice;248421 said:
    I made a slightly altered version of apple's "iPhoneCoreDataRecipes" example:

    https://developer.apple.com/library/ios/#samplecode/iPhoneCoreDataRecipes/Introduction/Intro.html

    I only changed the names of the model classes and the names of some of the attributes, for it to make more sense in the type of app I am making.

    When I run the app, though, it crashes on start up, and the debugger window says the following:


    [Session started at 2010-09-23 00:21:37 -0700.]
    2010-09-23 00:21:40.688 PocketPUA[15524:207] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+entityForName: could not locate an NSManagedObjectModel for entity name 'Set''
    *** Call stack at first throw:
    (
    0 CoreFoundation 0x02677919 __exceptionPreprocess + 185
    1 libobjc.A.dylib 0x0248c5de objc_exception_throw + 47
    2 CoreData 0x022a025b +[NSEntityDescription entityForName:inManagedObjectContext:] + 187
    3 PocketPUA 0x00003435 -[SetListTableViewController fetchedResultsController] + 158
    4 PocketPUA 0x00002d1b -[SetListTableViewController viewDidLoad] + 365
    5 UIKit 0x00373c26 -[UIViewController view] + 179
    6 UIKit 0x00372050 -[UIViewController contentScrollView] + 42
    7 UIKit 0x00381df7 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
    8 UIKit 0x003804ff -[UINavigationController _layoutViewController:] + 43
    9 UIKit 0x00381789 -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
    10 UIKit 0x0037c329 -[UINavigationController _startDeferredTransitionIfNeeded] + 266
    11 UIKit 0x00497209 -[UILayoutContainerView layoutSubviews] + 226
    12 QuartzCore 0x042070d5 -[CALayer layoutSublayers] + 177
    13 QuartzCore 0x04206e05 CALayerLayoutIfNeeded + 220
    14 QuartzCore 0x0420664c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 302
    15 QuartzCore 0x042062b0 _ZN2CA11Transaction6commitEv + 292
    16 UIKit 0x002ce63f -[UIApplication _reportAppLaunchFinished] + 39
    17 UIKit 0x002cea68 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 545
    18 UIKit 0x002d8452 -[UIApplication handleEvent:withNewEvent:] + 1958
    19 UIKit 0x002d1074 -[UIApplication sendEvent:] + 71
    20 UIKit 0x002d5ac4 _UIApplicationHandleEvent + 7495
    21 GraphicsServices 0x02dddafa PurpleEventCallback + 1578
    22 CoreFoundation 0x02658dc4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    23 CoreFoundation 0x025b9737 __CFRunLoopDoSource1 + 215
    24 CoreFoundation 0x025b69c3 __CFRunLoopRun + 979
    25 CoreFoundation 0x025b6280 CFRunLoopRunSpecific + 208
    26 CoreFoundation 0x025b61a1 CFRunLoopRunInMode + 97
    27 UIKit 0x002ce226 -[UIApplication _run] + 625
    28 UIKit 0x002d9b58 UIApplicationMain + 1160
    29 PocketPUA 0x00002344 main + 102
    30 PocketPUA 0x000022d5 start + 53
    31 ??? 0x00000001 0x0 + 1
    )
    terminate called after throwing an instance of 'NSException'


    I have been trying to get Core Data to work for months now. I have implemented persistent data with NSCoding, but it is not nearly as nice as what Core Data does - when it is working.

    Could someone please tell me what this error means, point me to a good Core Data tutorial, or a good resource on Core Data?
    Hi,

    you delete the previous build file and also in simulator you delete created icon of your app and execute again.....may be it will works....

    Thanks
    Dhanunjaya M
    Dhanunjaya

    www.yqlabs.com
Sign In or Register to comment.