简体   繁体   中英

App crashes with no Persistent stores after iOS7 update

I have an application that crashes with 'NSPersistentStoreCoordinator has no persistent stores. It cannot perform a save operation.' after a user upgrades from iOS6 to iOS7. The only fix for this is to delete the app because the persistent store is all messed up (obviously)

I really don't want users to have to delete the app and re-install it and lose all of their saved data. Is there a fix to help solve this issue?

What is the crash? Showing the crash log will help.

I suspect you are hitting a migration issue but without that crash log it is going to be difficult to guess.

If you can create the crash state while running against Xcode, where does it crash?

What is the code point?

Is it at -addPersistentStore... ? If so, what is the error being returned.

update

To be clear, if you are getting that generic error on a save that means you are ignoring the error on the -addPersistentStore call. Check that error and find out what the real problem is.

Can be that default journaling mode (WAL) is connected to data loss. CoreData turns on WAL by default since iOS 7. See Core Data and iOS 7: Different behavior of persistent store

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM