I\'m using iOS 5.1 I use this peace of code
[pathURL setResourceValue:[NSNumber numberWithBool:YES] forKey:NSURLIsExcludedFromBackupKey
It's worth to note that you can't just set the flag on NSHomeDirectory(). It has to be internal to that path.