0
votes

1.when I try to upgrade my app with new version on iPhone 5(iOS 8.1) it is crashing and in logs following messages are shown 2.but on iPad (iOS version 9.3) it is upgraded and working correctly.

2017-01-16 21:57:58.840 iMenu4u[199:7493] CoreData: error: -addPersistentStoreWithType:SQLite configuration:(null) URL:file:///var/mobile/Containers/Data/Application/33758D50-71B0-421E-BDEF-C4DE654833FC/Documents/Restaurant_App.sqlite options:{ NSInferMappingModelAutomaticallyOption = 1; NSMigratePersistentStoresAutomaticallyOption = 1; } ... returned error Error Domain=NSCocoaErrorDomain Code=134130 "The operation couldn’t be completed. (Cocoa error 134130.)" UserInfo=0x186274e0 {URL=file:///var/mobile/Containers/Data/Application/33758D50-71B0-421E-BDEF-C4DE654833FC/Documents/Restaurant_App.sqlite, metadata={ NSPersistenceFrameworkVersion = 519; NSStoreModelVersionHashes = { AppConfigData = <91e79eb3 93204ebc 5be5bdb3 38a8c76d f8457935 dde27339 2369b7cc adf2efaf>; AppState = <3d103f0a 206bebf1 1ff42e06 3df5aa24 af2ebe63 945db1aa 5ea028fc 329bf545>; Comments = ; Coupon = <29d647a0 5a02f9b7 3df7c9ae a6fe6256 5b5af073 df656cb5 8cb78bf5 acf22b37>; DelivaryAddress = <42b0cf74 38afa03d 0c953a3c 23f9fd05 7184f8f2 53db68b1 6876631a 9c6564ee>; DeliveryChargeConfig = <71044840 88917be5 5095afb1 e02dfff4 069187f4 56cc7a50 6e9c618a 45b07748>; FeedBackDB = <8c689d34 6a5b5ef4 fc9b9930 ed346f2d 25bf2476 5862594e 32b9665f d115e376>; LocalSelectedOrderOption = ; MenuCalendar = <85af0738 a811d0a3 c2376b1c 097a665d 613c90bb 9ac8c5a7 da8439a0 6daadcd7>; MenuCategory = ; MenuItem = ; MenuOption = ; Order = ; OrderDetails = ; OrderOptions = ; Person = ; Restaurant = <7073cb59 3ebc431f e0049cd8 a5e67106 8a3aec05 349dc497 7c701483 f552f153>; RestaurantBannerConfig = ; RestaurantCalender = <21efa3fa 3f1077fe 0b7c6db5 8b62caf3 ae46dbda 49ccf907 d048957a c3906d19>; RestaurantDeployment = <690457a9 b8f49fdb 6b2ac3da af46784d 7fe43811 1fdd3d19 c57fa1ca e13c47b3>; RestroManagedObject = ; SelectedRestaurantApiDetails = <08ca5f45 59c0b51f 21f3eb1e e5857d6a a7569df2 2c201648 6baed0b2 082e785f>; }; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers = ( 19 ); NSStoreType = SQLite; NSStoreUUID = "BBBF21BB-E24D-45EE-A0EB-E59774B9D69B"; "_NSAutoVacuumLevel" = 2; }, reason=Can't find model for source store} with userInfo dictionary { URL = "file:///var/mobile/Containers/Data/Application/33758D50-71B0-421E-BDEF-C4DE654833FC/Documents/Restaurant_App.sqlite"; metadata = { NSPersistenceFrameworkVersion = 519; NSStoreModelVersionHashes = { AppConfigData = <91e79eb3 93204ebc 5be5bdb3 38a8c76d f8457935 dde27339 2369b7cc adf2efaf>; AppState = <3d103f0a 206bebf1 1ff42e06 3df5aa24 af2ebe63 945db1aa 5ea028fc 329bf545>; Comments = ; Coupon = <29d647a0 5a02f9b7 3df7c9ae a6fe6256 5b5af073 df656cb5 8cb78bf5 acf22b37>; DelivaryAddress = <42b0cf74 38afa03d 0c953a3c 23f9fd05 7184f8f2 53db68b1 6876631a 9c6564ee>; DeliveryChargeConfig = <71044840 88917be5 5095afb1 e02dfff4 069187f4 56cc7a50 6e9c618a 45b07748>; FeedBackDB = <8c689d34 6a5b5ef4 fc9b9930 ed346f2d 25bf2476 5862594e 32b9665f d115e376>; LocalSelectedOrderOption = ; MenuCalendar = <85af0738 a811d0a3 c2376b1c 097a665d 613c90bb 9ac8c5a7 da8439a0 6daadcd7>; MenuCategory = ; MenuItem = ; MenuOption = ; Order = ; OrderDetails = ; OrderOptions = ; Person = ; Restaurant = <7073cb59 3ebc431f e0049cd8 a5e67106 8a3aec05 349dc497 7c701483 f552f153>; RestaurantBannerConfig = ; RestaurantCalender = <21efa3fa 3f1077fe 0b7c6db5 8b62caf3 ae46dbda 49ccf907 d048957a c3906d19>; RestaurantDeployment = <690457a9 b8f49fdb 6b2ac3da af46784d 7fe43811 1fdd3d19 c57fa1ca e13c47b3>; RestroManagedObject = ; SelectedRestaurantApiDetails = <08ca5f45 59c0b51f 21f3eb1e e5857d6a a7569df2 2c201648 6baed0b2 082e785f>; }; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers = ( 19 ); NSStoreType = SQLite; NSStoreUUID = "BBBF21BB-E24D-45EE-A0EB-E59774B9D69B"; "_NSAutoVacuumLevel" = 2; }; reason = "Can't find model for source store"; }

2017-01-16 21:57:58.848 iMenu4u[199:7493] CoreData: annotation: NSPersistentStoreCoordinator's current model hashes are { AppConfigData = <91e79eb3 93204ebc 5be5bdb3 38a8c76d f8457935 dde27339 2369b7cc adf2efaf>; AppState = <3d103f0a 206bebf1 1ff42e06 3df5aa24 af2ebe63 945db1aa 5ea028fc 329bf545>; Comments = ; Coupon = <29d647a0 5a02f9b7 3df7c9ae a6fe6256 5b5af073 df656cb5 8cb78bf5 acf22b37>; DelivaryAddress = <42b0cf74 38afa03d 0c953a3c 23f9fd05 7184f8f2 53db68b1 6876631a 9c6564ee>; DeliveryChargeConfig = <71044840 88917be5 5095afb1 e02dfff4 069187f4 56cc7a50 6e9c618a 45b07748>; FeedBackDB = <8c689d34 6a5b5ef4 fc9b9930 ed346f2d 25bf2476 5862594e 32b9665f d115e376>; LocalSelectedOrderOption = ; MenuCalendar = <85af0738 a811d0a3 c2376b1c 097a665d 613c90bb 9ac8c5a7 da8439a0 6daadcd7>; MenuCategory = <5add7c9f bd0522f0 b3588e63 a37806a9 2ac6a571 234d5f87 48fe0a76 6bcde5e2>; MenuItem = <8cea8408 9f264fcd e048a6e7 2991b43b a164f420 08b6534c 90f12e29 19fb5c25>; MenuOption = ; Order = ; OrderDetails = ; OrderOptions = ; Person = ; Restaurant = <7073cb59 3ebc431f e0049cd8 a5e67106 8a3aec05 349dc497 7c701483 f552f153>; RestaurantBannerConfig = ; RestaurantCalender = <21efa3fa 3f1077fe 0b7c6db5 8b62caf3 ae46dbda 49ccf907 d048957a c3906d19>; RestaurantDeployment = <690457a9 b8f49fdb 6b2ac3da af46784d 7fe43811 1fdd3d19 c57fa1ca e13c47b3>; RestroManagedObject = ; SelectedRestaurantApiDetails = <08ca5f45 59c0b51f 21f3eb1e e5857d6a a7569df2 2c201648 6baed0b2 082e785f>; }

2
What do you mean by upgrade? Are you installing a new version of the app from the App Store or from Xcode ?Robert J. Clegg
I am installing new version from xcode.shailesh Parkhi

2 Answers

0
votes

I think you need to explicitly create new versions of your schema in your project, such that iOS can compare the two schemas from the app bundle and perform the lightweight migration.

from iOS 9, the Core Data store stores the current schema alongside the (sqlite) datafile(s), such that if/when you change the schema in the app bundle, it can perform the lightweight migration between the schema captured on disk and the new schema in your app bundle.

here's google search result may help you… http://www.informit.com/articles/article.aspx?p=2150667&seqNum=2

0
votes

I found issue with my new app version.Issue is that, in new app version I have added a column in "old model version" and then performed migration to "new model version". I have corrected it now.