title: iOS App Rejection due to 2.23 - Realm database
body: <p>Here's message from Apple:</p>
  <blockquote>
  <p>2.23 Details</p>
  <p>On launch and content download, your app stores 6.38 MB on the user's iCloud, which does not comply with the iOS Data Storage Guidelines.</p>
  <p>Next Steps</p>
  <p>Please verify that only the content that the user creates using your app, e.g., documents, new files, edits, etc. is backed up by iCloud as required by the iOS Data Storage Guidelines. Also, check that any temporary files used by your app are only stored in the /tmp directory; please remember to remove or delete the files stored in this location when it is determined they are no longer needed.</p>
  <p>Data that can be recreated but must persist for proper functioning of your app - or because users expect it to be available for offline use - should be marked with the &quot;do not back up&quot; attribute. For NSURL objects, add the NSURLIsExcludedFromBackupKey attribute to prevent the corresponding file from being backed up. For CFURLRef objects, use the corresponding kCRUFLIsExcludedFromBackupKey attribute.</p>
  </blockquote>
  <p>I checked my testing device iCloud backup and it is about ~0,3KB on launch.</p>
  <p>I am using Realm.io database for storing data, but I set path of realm file to ..Library/Cache. Realm version 0.100.</p>
  <p>change of path in code:</p>
  <pre><code>Realm.Configuration.defaultConfiguration.fileURL = NSURL(fileURLWithPath: NSSearchPathForDirectoriesInDomains(.CachesDirectory, .UserDomainMask, true)[0].stringByAppendingPathComponent(&quot;cache.realm&quot;))
  </code></pre>
  <p>So I checked storage activity in debugger and also placement of file. But every option shows that files are actually saved in Cache folder and Documents folder is empty. Am I missing something ? What should I do next ?</p>