This generally means that you're storing some data, cache files, or profile images for example, that can be recreated/redownloaded by your app, in a location that iCloud will back up. That wastes the users data, and server space for Apple. They've really been cracking down on this over the last 6 months or so.
You can either store the files in a place not backed up by iCloud (/Library/Application Support), or flag the files with the do not backup attribute.
Get that folder in code like this:
NSString* appSupportFolder = [NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) firstObject];
Here's a category you can use to set the do not backup attribute:
@implementation NSURL (DoNotBackupAttribute)
- (BOOL)dw_addDoNotBackupAttribute
{
if (![[NSFileManager defaultManager] fileExistsAtPath:[self path]]) return NO;
__autoreleasing NSError* error = nil;
if (![self setResourceValue:@(YES) forKey:NSURLIsExcludedFromBackupKey error:&error]) {
NSLog(@"Error: failed to set do not backup attribute on file %@, error: %@", self, [error localizedDescription]);
}
return YES;
}
@end