Most probably you are storing your "map.sqlite" in your application's Documents directory. Sqlite files are normally copied to Documents directory so that they are writable. But iOS, by default, tries to copy or backup all the files in Documents directory to iCloud (if iCloud backup is turned on). Therefore, according to Apple's guidelines, you can do the following so that your database file is not backed up by iCloud from your Documents directory.
You can call the following function to pass the path of your "map.sqlite" as NSURL:
NSURL *url = [NSURL fileURLWithPath:yourSQLitePath];
[self addSkipBackupAttributeToItemAtURL:url];
The function is provided in Apple as:
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
{
assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]);
NSError *error = nil;
BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES]
forKey: NSURLIsExcludedFromBackupKey error: &error];
if(!success){
NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error);
}
return success;
}
This function makes sure that the file (provided as URL) is not backed up by iCloud.
You can also put your database files in a separate directory inside Documents directory and mark that whole subdirectory as 'do not backup' by calling this function. Hope it helps.