I already have and existing app on the App Store which has an sqlite file. In my next release i want to just update the sqlite file without changing the schema. I just added more number cities than i had previously.
i downloaded the old app from App Store. open it and push it to background. Now i open Xcode which has new sqlite file and run the code. The app crashes giving a weird error about the schema changes. Not sure why. error is below.
LOGS
The database at /var/mobile/Applications/9C7203DF-770E-419F-B257-ABF769E8210D/Documents/Mydatabase.sqlite is corrupted. SQLite error code:11, 'database disk image is malformed'
After few other lines of logs. I get the below where it crashes.
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+entityForName: nil is not a legal NSManagedObjectContext parameter searching for entity name ‘XXXGMOriginAndDestination'' * First throw call stack: (0x2d7f8ecb 0x37f93ce7 0x2d549483 0x1e84d9 0x1e6e49 0x447559 0x446a25 0x43e8d1 0x441bef 0x30099ca1 0x300995f3 0x30093ca9 0x3002fc77 0x3002edd9 0x300933e5 0x3269cb55 0x3269c73f 0x2d7c3807 0x2d7c37a3 0x2d7c1f6f 0x2d72c729 0x2d72c50b 0x3009260b 0x3008d871 0x11709f 0x38491ab7) libc++abi.dylib: terminating with uncaught exception of type NSException
Aucun commentaire:
Enregistrer un commentaire