Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. NSDictionary *options = @{
  2. NSMigratePersistentStoresAutomaticallyOption : @(YES),
  3. NSInferMappingModelAutomaticallyOption : @(YES)
  4. };
  5.  
  6. sqlStore = [_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType
  7. configuration:nil
  8. URL:storeURL
  9. options:options
  10. error:&error];
  11.  
  12. [[NSFileManager defaultManager] setAttributes:[NSDictionary dictionaryWithObject:NSFileProtectionNone forKey:NSFileProtectionKey] ofItemAtPath:storePath error:nil];
  13.  
  14. while(![[UIApplication sharedApplication] isProtectedDataAvailable]) {
  15. [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.5f]];
  16. }
  17.  
  18. applicationProtectedDataDidBecomeAvailable:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement