This basically depends on the flow of your application. For instance, i doubt that all the 30k records needs to be available at first run in most of the cases, which would require you to program an "on-demand" strategy (When requiring the obejct load them).
If you really need the 30k objects available at first run, then you would probably need to establish an exchange format on first run (i used to use binary property list, it's well optimized).
About the update issue, i would recommend you to make sure the server keeps track of changes (Basically, it would just "timestamp" all objects on their last modification datetime), so when your client connects, the server just has to send the delta of modified objects based on the last update your client has.
Best to you!
Don't know if it helps,
Pierre.
How do I make RestKit not delete but update existing objects?
On every GET I receive same objects. But rest kit deleted existing objects and replaces them with identical copies.
Object mapping:
RKManagedObjectMapping* itemMapping = [RKManagedObjectMapping mappingForClass:[Item class] inManagedObjectStore:objectStore];
itemMapping.primaryKeyAttribute = @"itemId";
[itemMapping mapKeyPath:@"id" toAttribute:@"itemId"];
RKResponse.m:218 Read response body: [{"id":144614501} ......
estkit.core_data:RKManagedObjectLoader.m:143 Deleting orphaned object <Item: 0xc93ad60> (entity: Item; id: 0xc935c20 <x-coredata://03AD71D5-2841-434D-8482-E840B879EC20/Item/p478> ; data: {
itemId = 144614501;
RKOBjectLoader - (RKObjectMappingResult*)mapResponseWithMappingProvider:(RKObjectMappingProvider*)mappingProvider toObject:(id)targetObject inContext:(RKObjectMappingProviderContext)context error:(NSError**)error;
for (id object in cachedObjects) {
if (NO == [results containsObject:object]) {
RKLogTrace(@"Deleting orphaned object %@: not found in result set and expected at this resource path", object);
[[self.objectStore managedObjectContextForCurrentThread] deleteObject:object];
}
}
[self.managedObjectContext setMergePolicy:NSMergeByPropertyObjectTrumpMergePolicy];
If it doesn't work, post your code of getting the objects and your handling of the response.