5

I have an app with in-app purchase mechanism on app-store. The in-apps are zipped folder with sqlite dbs inside, so when you buy an app the flow is this:

Buy in-app -> download contents -> loop trought the update.sqlite db and insert rows in the app.slite db -> conclusion and success alert.

This flow stop to works with 10 or 10.1 or 10.1.1 (i haven't a 10.0 and 10.1 device to test it). Saving context after looping the update.sqlite cause the app to "freeze". Context:save doesn't return any errors but the app doesn't conclude the save process. The strange thing in the app now is the log:

(NSFetchedResultsController): couldn't read cache file to update store info timestamps

i have search, it is a bug already reported as this answer says but when i receive the error log i'm not using NSFetchedResultsController, but i'm simply made a fetchRequest to insert or retrive objects. Like:

    NSManagedObjectContext *contesto=[(AppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext];
    Image  *newImage = [NSEntityDescription insertNewObjectForEntityForName:@"Image" inManagedObjectContext:contesto];
            newImage.recipe=newRecipe;
            newImage.image=newImgs;

    NSError *error = nil;
    if (![contesto save:&error]) {
        NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
        abort();
    }

Why i obtain this error log without directly use NSFetchedResultsController ? How i can fix it ? I have to test if it cause the update fails of my app in ios 10.

EDIT This isn't a duplicate cause i don't use directly NSFetchedResultsController but i'm affected by the same bug of the question linked

Community
  • 1
  • 1
user31929
  • 1,115
  • 20
  • 43

0 Answers0