Iphone Core Data Noob Question- Why can't I change or add entities in data model?

1

If I build a new project using the IOS Navigation template and add a single attribute to event entity in the data model, and then run, the application crashes.

I'm new to IOS development and have worked through the Apple Core Data app tutorial, and have read a few posts on migration issues, but I haven't seen this specific problem discussed so I must be missing something incredibly obvious.

Do I need to refresh the data model? Is it a migration issue? It has no existing entries as it's a clean application.

Thanks!

Console Output:

#0  0x97225ef6 in __kill
#1  0x97225ee8 in kill$UNIX2003
#2  0x972b862d in raise
#3  0x972ce6e4 in abort
#4  0x00002674 in -[NavBonjourAppDelegate persistentStoreCoordinator] at NavBonjourAppDelegate.m:175
#5  0x00002342 in -[NavBonjourAppDelegate managedObjectContext] at NavBonjourAppDelegate.m:111
#6  0x0000210e in -[NavBonjourAppDelegate awakeFromNib] at NavBonjourAppDelegate.m:25
#7  0x004a94f0 in -[UINib instantiateWithOwner:options:]
#8  0x004ab081 in -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:]
#9  0x002b5943 in -[UIApplication _loadMainNibFile]
#10 0x002b64ca in -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:]
#11 0x002c0db2 in -[UIApplication handleEvent:withNewEvent:]
#12 0x002b9202 in -[UIApplication sendEvent:]
#13 0x002be732 in _UIApplicationHandleEvent
#14 0x018b7a36 in PurpleEventCallback
#15 0x00f63064 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
#16 0x00ec36f7 in __CFRunLoopDoSource1
#17 0x00ec0983 in __CFRunLoopRun
#18 0x00ec0240 in CFRunLoopRunSpecific
#19 0x00ec0161 in CFRunLoopRunInMode
#20 0x002b5fa8 in -[UIApplication _run]
#21 0x002c242e in UIApplicationMain
#22 0x0000209c in main at main.m:14

from #0 details:

0x97225eec  <+0000>  mov    $0xc0025,%eax
0x97225ef1  <+0005>  call   0x971c53d8 <_sysenter_trap>
0x97225ef6  <+0010>  jae    0x97225f06 <__kill+26>
0x97225ef8  <+0012>  call   0x97225efd <__kill+17>
0x97225efd  <+0017>  pop    %edx
0x97225efe  <+0018>  mov    0x96c29e3(%edx),%edx
0x97225f04  <+0024>  jmp    *%edx
0x97225f06  <+0026>  ret    
iphone
core-data
asked on Stack Overflow Jan 19, 2011 by nflacco • edited Jan 19, 2011 by nflacco

1 Answer

1

It's a missmatch in Data Models. Just delete the "old" version from simulator/device and run again, should work then.

answered on Stack Overflow Jan 19, 2011 by Björn Kaiser

User contributions licensed under CC BY-SA 3.0