Here is what worked for me. Basically put the maps in application support and flag them not to be backed up.
- (NSURL *) getApplicationSupportUrl {
NSFileManager *fm = [NSFileManager defaultManager];
NSArray *urls = [fm URLsForDirectory:NSApplicationSupportDirectory inDomains:NSUserDomainMask];
NSURL *url = [urls objectAtIndex:0];
url = [url URLByAppendingPathComponent:[[NSBundle mainBundle] bundleIdentifier] isDirectory:YES];
return url;
}
- (NSURL *) getMapDirectory:(int)cityid {
NSURL *url = [self getApplicationSupportUrl];
url = [url URLByAppendingPathComponent:[NSString stringWithFormat:@"map%d",cityid] isDirectory:YES];
return url;
}
- (BOOL) excludeDirectoryFromBackup:(NSURL *)url {
NSError *error = nil;
BOOL success = [url setResourceValue:[NSNumber numberWithBool:YES] forKey:NSURLIsExcludedFromBackupKey error:&error];
return success;
}
// in the app
NSRUL *mapurl = [self getMapDirectory:123];
// download maps tiles to mapurl
[self excludeDirectoryFromBackup:mapurl];