Вопрос

I experimenting NSIncrementalStore and documentation says "First, the persistent store coordinator invokes obtainPermanentIDsForObjects:error: .. then, the coordinator invokes executeRequest:withContext:error: "

In my case obtainPermanentIDsForObjects method is not get called, but executeRequest will get called with NSSaveRequestType argument. What is the problem?

I created a NSManagedObject and called the save method.

Это было полезно?

Решение

I tried to add a local and a remote store to coordinator, and this caused to block the method call. So I just removed the first line.

[_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options: @{NSSQLitePragmasOption : @{@"journal_mode" : @"DELETE"}} error:&error];
[_persistentStoreCoordinator addPersistentStoreWithType:@"CustomIncrementalStore" configuration:nil URL:nil options:nil error:&error];
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top