DEPRECATED-mapbox-ios-sdk icon indicating copy to clipboard operation
DEPRECATED-mapbox-ios-sdk copied to clipboard

RMTileCache in Documents

Open trdavidson opened this issue 9 years ago • 2 comments

When using the offline-maps example, the RMTileCache of the Map appears in the Documents folder. This will immediately cause a rejection in the App Store. We are getting ready to ship our App for production and wanted to ask how to change this behaviour for RMTileCache. Thanks!

trdavidson avatar Jun 01 '15 15:06 trdavidson

I've been dealing with this as well in our project. You can temporarily disable iCloud sync:

[[NSURL fileURLWithPath:[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]]
    setResourceValue:[NSNumber numberWithBool:YES]
        forKey:NSURLIsExcludedFromBackupKey error:nil];

for the whole Documents folder or for a specific path by modifying the code above; your app will stop syncing the provided path and should become review-compliant. Otherwise you can customize this path in Mapbox component source. AFAIK there's no programatic way to change this at this moment.

username0x0a avatar Jun 02 '15 13:06 username0x0a

I haven't tried this myself, but you should be able change the cache path from Documents to Caches with routeme.plist. See the example plist on the SDK page under "File-based cache configuration" where useCachesDirectory gets set to true.

jcarbaugh avatar Jun 09 '15 20:06 jcarbaugh