Tag Archives: backup

Preventing backup to iCloud

5.1 and up

- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
{
    assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]);
 
    NSError *error = nil;
    BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES]
                                  forKey: NSURLIsExcludedFromBackupKey error: &error];
    if(!success){
        NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error);
    }
    return success;
}

5.0.1

#import 
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
{
    assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]);
 
    const char* filePath = [[URL path] fileSystemRepresentation];
 
    const char* attrName = "com.apple.MobileBackup";
    u_int8_t attrValue = 1;
 
    int result = setxattr(filePath, attrName, &attrValue, sizeof(attrValue), 0, 0);
    return result == 0;
}

Source

Getting music off/backup iPod on Mac

The iPod manager tool, iTunes allows only to copy your music TO the iPod. However if you would like to get the music off (e.g. migrating to another MP3 player) or simply want to backup it’s storage, you can use the following FREE apps:
DeTune (Recommended)
iPodDisk

For more information: http://www.metaphoriclabs.com/articles/5-ways-to-copy-music-off-your-ipod-windows-mac-os-x/