Reputation: 12684
I have a somewhat large database shipping with my application that is ONLY readable (the user writes nothing to this database). I'm looking for a very simple way to make sure that this database is not backed up. Is there an easy way to mark the database file as "do not back this up"?
Upvotes: 0
Views: 62
Reputation: 16946
Create an NSURL
instance with your file, and then set the NSURLIsExcludedFromBackupKey
resource value:
[url setResourceValue:@YES forKey:NSURLIsExcludedFromBackupKey error:NULL]; // Can use an NSError for error reporting of course
From QA 1719
Upvotes: 3