forked from alekseyn/iCloudStoreManager
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
I'm using the following code sometimes to deal with data:
NSManagedObjectContext *context = [appDelegate managedObjectContext];
if (context != nil)
{
__block NSArray *objects;
[context performBlockAndWait:^
{
NSEntityDescription *entityDesc = [NSEntityDescription entityForName:@"RainbowPonies" inManagedObjectContext:context];
NSFetchRequest *request = [[NSFetchRequest alloc] init];
[request setEntity:entityDesc];
NSError *error;
objects = [context executeFetchRequest:request error:&error];
if (error)
{
NSLog(@"err: %@",error);
}
}];
return objects;
}
Sometimes other apps accessing the same iCloud storage (just on the same device! (example: lite/pro)), then I get randomly a freeze by calling the code. By terminating the other App, the current App starts working again.
Every data-interaction-code runs in performBlockAndWait, so it should not be the problem?
What should I do to fix this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels