title: problems with IOS storage
body: <p>Sorry for my english. I have a problem with a storage and Apple rejected my app. I use a sqlite db in my app and copy it from bundle because I need update records in a db. There is many information about this but all it not working for me! </p>
  
  <p>I tryed to use <code>NSURLIsExcludedFromBackupKey</code> with directories <code>NSApplicationSupportDirectory</code>, <code>library/caches</code> and another, but it's not working and I see my app in storage with size of db, if I not copy my db I dont see my app in storage, but I need a copy.</p>
  
  <p>What I have to do?</p>
  
  <p>I use iOs9 , xCode 7:</p>
  
  <pre><code>BOOL success;
  NSFileManager *fileManager = [NSFileManager defaultManager];
  NSError *error;
  stringByAppendingPathComponent:@"db_words"];
  NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] 
  stringByAppendingPathComponent:@"db_words"];
  NSURL *applicationSupportDirectory = [[NSFileManager defaultManager]     URLForDirectory:NSApplicationSupportDirectory
                                                                       inDomain:NSUserDomainMask
                                                                     appropriateForURL:nil
                                                                        create:YES
                                                                         error:&amp;error];
  
  NSURL *referenceFolder = [applicationSupportDirectory     URLByAppendingPathComponent:@"Reference" isDirectory:YES];
  
  success = [[NSFileManager defaultManager] createDirectoryAtPath:[referenceFolder path]
                                 withIntermediateDirectories:YES
                                                  attributes:nil
                                                       error:&amp;error]
  
  success = [referenceFolder setResourceValue:@YES forKey: NSURLIsExcludedFromBackupKey error: &amp;error];
  
  if(!success){
      NSLog(@"KCDM: Error excluding %@ from backup %@", referenceFolder, error);
  }
  
  
  NSString * writableDBPath = [referenceFolder.path stringByAppendingPathComponent:@"db_words"];
  success = [fileManager copyItemAtPath:defaultDBPath toPath:writableDBPath error:&amp;error];
  if (!success)
      NSAssert1(0, @"Failed to create writable database file with message '%@'.", [error localizedDescription]);
  
  return writableDBPath;
  </code></pre>