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
you can do the following in swift:
func addSkipBackupAttributeToItemAtPath(path:String) -> Bool {
let filePath = path.fileSystemRepresentation()
let attrName = "com.apple.MobileBackup"
var attrValue : uint_fast8_t = 1
let result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue.dynamicType), 0, 0)
return result == 0
}