I’m making an iOS application which allows the user to upload their files to the iOS device.
I know that with iOS 5.0.1 and above I can store the files to the Documents directory and mark it as “Do not backup” so that the files won’t be synced by iCloud.
I also know that with iOS 4.x and below I can still put the files into Documents because there is no support for iCloud.
The question is: what to do with exact the version iOS 5.0? It support iCloud but no “Do not backup” flag.
See http://developer.apple.com/library/ios/#qa/qa1719/_index.html:
Important The new “do not back up” attribute will only be used by iOS 5.0.1 or later. On iOS 5.0 and earlier, applications will need to store their data in /Library/Caches to avoid having it backed up. Since this attribute is ignored on older systems, you will need to insure your app complies with the iOS Data Storage Guidelines on all versions of iOS that your application supports.
So you should put it in /Library/Caches.