I’m able to complete my iphone app using core data internally.
But for the first time when I’m running in simulator or on device its crashing with following error:
2010-03-18 10:55:41.785 CrData[1605:4603] Unresolved error Error Domain=NSCocoaErrorDomain Code=513 UserInfo=0x50448d0 “Operation could not be completed. (Cocoa error 513.)”, {
NSUnderlyingException = Error validating url for store;
}
When I run the app again in simulator or on device, its running perfectly. I’m not able to identify the exact problem. Can some one guide me on how to proceed further???
You need to unroll the errors and see what is going on. Inside of that error (which you can set a break point on objc_exception_thrown to catch it) is the userInfo dictionary which you can interrogate to see what the underlying errors are.
update
What does your
NSPersistentStoreCoordinatorcreation code look like?Did you add a break point and do a
po [error userInfo]so see if there were any additional errors in the userInfo?Core Data can and does send you a hierarchy of errors and frequently on a small amount of information is exposed at the top error. Unrolling the errors via the debugger is best to determine the underlying causes.
update
Again, what does your persistent store creation code look like? You need to post some code so that I can take a look at it. Otherwise I am just guessing which is no fun.