core-data-migration

Out-Of-Memory while doing Core Data migration

微笑、不失礼 提交于 2019-11-30 13:30:18
问题 I'm migrating a CoreData model between two versions of an application. I was storing binary data as blobs in the previous version and I want to take them out of the blobs for performance. My issue is that during the migration it seems that Core Data loads everything into memory which leads to Low Memory Warnings and then to my app being killed. Apple documentation suggests the following : http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreDataVersioning/Articles

Core Data change property from Integer 16 to Integer 32

走远了吗. 提交于 2019-11-30 07:41:57
I'm having a very serious problem. The application is live, but unfortunately it's fails on iOS 5, and I need to post an update. The thing is the ID column of few entities is in Integer 16, but I need to be changed to Integer 32. It was clearly my mistake, the model was created very long time ago, and it was only being reused. To my surprise (now) on iOS 4, Integer 16 in Core Data could easily keep number as big as 500 000 (bug?), but it doesn't work like that now - it gives me invalid numbers. Application is live, has it success and Core Data is also used to keep the users scores,

Out-Of-Memory while doing Core Data migration

天涯浪子 提交于 2019-11-30 07:28:13
I'm migrating a CoreData model between two versions of an application. I was storing binary data as blobs in the previous version and I want to take them out of the blobs for performance. My issue is that during the migration it seems that Core Data loads everything into memory which leads to Low Memory Warnings and then to my app being killed. Apple documentation suggests the following : http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreDataVersioning/Articles/vmCustomizingTheProcess.html#//apple_ref/doc/uid/TP40005510-SW9 However, it seems to rely on the fact that the

Multiple Pass Core Data Migration In Chunks With iOS

女生的网名这么多〃 提交于 2019-11-30 06:49:48
I'm trying to migrate an iPhone/iPad sqlite store of about 11Mb. It has around thirty different entities, all quite heavily interrelated. On a 3GS, it takes quite some time. Even a lightweight migration takes around four minutes. I guess this is because all the relationships are held in memory. Reading the Apple migration guide, it says that for large datasets, one approach is to do multiple passes using different mapping models. All well and good. However, it seems that you can't do this if the entities in one mapping model are related to those in another. In fact, a compilation error is

Migrating a many-to-many relationship to a join table in Core Data

China☆狼群 提交于 2019-11-29 23:19:51
I've got an iPhone app that uses many-to-many relationships to link tags and notes together. I'm currently using Core Data's "Relationships" feature to accomplish this, but would like to migrate to using a join table instead. Here's my challenge: I'd like to migrate from the old model to the join-table model, and I need to figure out how to perform that data migration. Are there any good examples of how to do this? Update: I'm clarifying my question here to help out with what's going on here: I want to try using Simperium to support our app, but Simperium doesn't support many-to-many

Core Data change property from Integer 16 to Integer 32

故事扮演 提交于 2019-11-29 10:24:40
问题 I'm having a very serious problem. The application is live, but unfortunately it's fails on iOS 5, and I need to post an update. The thing is the ID column of few entities is in Integer 16, but I need to be changed to Integer 32. It was clearly my mistake, the model was created very long time ago, and it was only being reused. To my surprise (now) on iOS 4, Integer 16 in Core Data could easily keep number as big as 500 000 (bug?), but it doesn't work like that now - it gives me invalid

iPhone Core Data Lightweight Migration: Can't merge models

旧巷老猫 提交于 2019-11-29 08:20:43
I just started with iPhone core data and I ran into a problem in lightweight migration. I added two new fields to my old model Regenerated the model class files Made the new model version as current version Added the following code in AppDelegate in the template generated NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil]; if (![persistentStoreCoordinator_ addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL

Multiple Pass Core Data Migration In Chunks With iOS

本小妞迷上赌 提交于 2019-11-29 07:22:45
问题 I'm trying to migrate an iPhone/iPad sqlite store of about 11Mb. It has around thirty different entities, all quite heavily interrelated. On a 3GS, it takes quite some time. Even a lightweight migration takes around four minutes. I guess this is because all the relationships are held in memory. Reading the Apple migration guide, it says that for large datasets, one approach is to do multiple passes using different mapping models. All well and good. However, it seems that you can't do this if

How to Test Core Data Migration With an App Already in the App Store?

梦想与她 提交于 2019-11-29 02:51:01
问题 We have an app that is currently in the app store. It uses Core Data as its persistence mechanism. We have a new version ready to go, and it has some schema changes. Specifically, we have added 1 new entity and added a new attribute to an existing entity. From my understanding and reading, this is one of the most simple migrations that can occur. There are no field deletions, and no relationships to change. The data model consists of 5 entities with no relationships at all. We have versioned

What is an efficient way to Merge two iOS Core Data Persistent Stores?

孤街浪徒 提交于 2019-11-28 21:37:25
In our app under development we are using Core Data with a sqlite backing store to store our data. The object model for our app is complex. Also, the total amount of data served by our app is too large to fit into an iOS (iPhone/iPad/iPod Touch) app bundle. Because of the fact that our users are, typically, interested only in a subset of the data, we've partitioned our data in such a way that the app ships with a subset (albeit, ~100 MB) of the data objects in the app bundle. Our users have the option of downloading additional data objects (of size ~5 MB to 100 MB) from our server after they