I am trying to prevent a whole folder from beeing backed up by itunes. I followed the Technical Report http://developer.apple.com/library/ios/#qa/qa1719/_index.html But it seems
I just fixed this in my app and while it was kind of frustrating , it all ended up working great. So , here's the code for the addSkipBackupAttributeToItemAtURL . You may want to check that out. It treats 5.0.1 and 5.0 too. You are only treating 5.1 and higher in your code.
BUT:
Let's say you have an NSString *path - the path to your file /folder , don't call the method with:
[NSURL urlWithString:path];
It will work on 5.0.1 but not on 5.1 and higher.
Instead use [NSURL fileURLWithPath:path];
So: [MyClass addSkipBackupAttributeToItemAtURL:[NSURL fileURLWithPath:path]];
In fact , I think that is the only problem with your code. Taking the method I linked to , will only provide backward compatibility , which is a great addition.
Hope this helps.
Regards, George
Same problem for me. I also solved it changing the way I called addSkipBackupAttributeToItemAtURL That's the correct way:
[MyClass addSkipBackupAttributeToItemAtURL:[NSURL fileURLWithPath:path]];