I have a huge tree of files and dirs for cache in my document directory.
As recommended, I’m going to use NSURLIsExcludedFromBackupKey for preventing iTunes from saving this data with the app.
Can I use it once on my root directory URL, as
[rootDirectoryURL setResourceValue:[NSNumber numberWithBool:YES] forKey:@"NSURLIsExcludedFromBackupKey" error:&error];
Or will I have to call it for each file?
Yup, you can pass it a NSURL of the directory you want excluded.
And you can test any files if in doubt using