core-data-migration

iOS8.1 Core-Data Lightweight + Heavyweight Migration

拜拜、爱过 提交于 2021-02-10 09:42:49
问题 I have Version 1 of my core-data database. (Reduced example) I make some changes to the model, making V2. This involves creating a new entity with type attribute plus a few others. The type attribute is the link to the plate entity. The new version of my app is released and the data migrates ok as this is lightweight. For my own reasons at the time, I did not create a relationship at this time. Sometime later I decide to do some bigger changes to the structure, creating new entities

iOS8.1 Core-Data Lightweight + Heavyweight Migration

a 夏天 提交于 2021-02-10 09:41:39
问题 I have Version 1 of my core-data database. (Reduced example) I make some changes to the model, making V2. This involves creating a new entity with type attribute plus a few others. The type attribute is the link to the plate entity. The new version of my app is released and the data migrates ok as this is lightweight. For my own reasons at the time, I did not create a relationship at this time. Sometime later I decide to do some bigger changes to the structure, creating new entities

Migrate Core Data database from one app to another

橙三吉。 提交于 2021-02-04 21:29:44
问题 I have a Core Data database that I wish to pre-populate without having to load all the data on first launch. I'm trying to do this by creating a second app that takes care of the loading and copy the SQL database from that app to the new one. Initially I tried to simply copy the .sqlite file from the second app and copy the files into the first app like this: lazy var persistentContainer: NSPersistentContainer = { let container = NSPersistentContainer(name: "GeoPointDB") let seededData:

Migrate Core Data database from one app to another

狂风中的少年 提交于 2021-02-04 21:28:08
问题 I have a Core Data database that I wish to pre-populate without having to load all the data on first launch. I'm trying to do this by creating a second app that takes care of the loading and copy the SQL database from that app to the new one. Initially I tried to simply copy the .sqlite file from the second app and copy the files into the first app like this: lazy var persistentContainer: NSPersistentContainer = { let container = NSPersistentContainer(name: "GeoPointDB") let seededData:

CoreData crash error Xcode 11 Beta, IOS 13 Beta

半城伤御伤魂 提交于 2020-07-04 10:11:22
问题 Im trying building my application from Xcode11 beta on phone IOS 13 Beta. I have crash when application loading. 2019-07-22 13:58:12.910460+0300 GoodWine[3738:792501] [error] fault: One or more models in this application are using transformable properties with transformer names that are either unset, or set to NSKeyedUnarchiveFromDataTransformerName. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead. At some point, Core Data will

getting Black Screen while integrating CoreData to my ToDo app Swift

二次信任 提交于 2020-04-16 06:08:20
问题 I am learning Swift from Online Course and while my instructor integrating CoreData to her existing code, She creates a new core data model and copy-paste App Delegate. But in her DataModel, there is not a SceneDelegate while there is in mine. The problem is that I can not do the same things as her because of these differences. Therefore, I copied SceneDelegate.swift file into my Xcode project and copy other things from DataModel App Delegate. After this solution, I got a black screen. I do

getting Black Screen while integrating CoreData to my ToDo app Swift

你说的曾经没有我的故事 提交于 2020-04-16 06:08:01
问题 I am learning Swift from Online Course and while my instructor integrating CoreData to her existing code, She creates a new core data model and copy-paste App Delegate. But in her DataModel, there is not a SceneDelegate while there is in mine. The problem is that I can not do the same things as her because of these differences. Therefore, I copied SceneDelegate.swift file into my Xcode project and copy other things from DataModel App Delegate. After this solution, I got a black screen. I do

Core Data lightweight migration crashes after App update

一世执手 提交于 2020-02-03 11:40:11
问题 Two days ago I released the App. According to feedback on AppStore and crash reports from itunesconnect there are a lot of crashes on launch. But not 100% users suffered, only 30% maybe. I've read the crash logs and saw a problem. It's crashing on DB migration process. I use lightweight migration of database. Usually I add new datamodel version very carefully. Even before each release I install a previous version of the App, use it for some time and only then I install the latest version

Core Data lightweight migration crashes after App update

谁说胖子不能爱 提交于 2020-02-03 11:40:07
问题 Two days ago I released the App. According to feedback on AppStore and crash reports from itunesconnect there are a lot of crashes on launch. But not 100% users suffered, only 30% maybe. I've read the crash logs and saw a problem. It's crashing on DB migration process. I use lightweight migration of database. Usually I add new datamodel version very carefully. Even before each release I install a previous version of the App, use it for some time and only then I install the latest version

Core Data 'File “Contents” couldn't be opened'

99封情书 提交于 2020-01-15 04:15:40
问题 I made the silly mistake and I accidentially touch my current Core Data model instead the new version one I just created. So I went to source control and reverted the changes inside the **.xcdatamodeld group. However I have now a zombie entry in the project structure inside this group (its the new version **.xcdatamodel I have created) that I can't open (message like in the title). Probably because reverting deleting the files but somehow the reference is still there. Just a little bit