Don't Backup to iCloud but still rejected Don't Backup to iCloud but still rejected objective-c objective-c

Don't Backup to iCloud but still rejected


The problem is with iOS 5.0, in this iOS you should not put the dont backup flagThe dont back up flag was introduced in ios 5.0.1We did face similar problem with our app, it has been rejected several timesSo we had to do a work around to handle different iOSesWe needed to support iOS < 5.0, iOS 5.0, and iOS > 5.0

So after contacting apple, we didnt find any solution except to have different paths on different iOSes

We had a function like this:

+ (NSString*) savePath{    NSString *os5 = @"5.0";    NSString *currSysVer = [[UIDevice currentDevice] systemVersion];    NSString *path = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];    if ([currSysVer compare:os5 options:NSNumericSearch] == NSOrderedAscending) //lower than 4    {        return path;    }    else if ([currSysVer compare:os5 options:NSNumericSearch] == NSOrderedDescending) //5.0.1 and above    {                return path;    }    else // IOS 5    {        path = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Caches"];        return path;    }    return nil;}

We used and still use this function.

Please read more

iOS 5.0

It is not possible to exclude data from backups on iOS 5.0. If your app must support iOS 5.0, then you will need to store your app data in Caches to avoid that data being backed up. iOS will delete your files from the Caches directory when necessary, so your app will need to degrade gracefully if it's data files are deleted.

http://developer.apple.com/library/ios/#qa/qa1719/_index.html