Referencing iCloud + Storage of media in iPhone Documents folder, which shows how to set the iOS 5.0.1 \"Do Not Backup\" attribute for a file.
Is there an efficient
Correction on above method,use this for swift
func addSkipBackupAttributeToItemAtURL(URL:NSURL) ->Bool {
let fileManager = NSFileManager.defaultManager()
assert(fileManager.fileExistsAtPath(URL.absoluteString!))
var error:NSError?
let success:Bool = URL.setResourceValue(NSNumber(bool: true),forKey: NSURLIsExcludedFromBackupKey, error: &error)
if !success{
println("Error excluding \(URL.lastPathComponent) from backup \(error)")
}
return success;
}