Skip to content

Instantly share code, notes, and snippets.

@naokits
naokits / iOSDocumentMigrator.m
Created December 14, 2011 03:37 — forked from steipete/iOSDocumentMigrator.m
Helps migrating documents between iOS <= 5.0 and >= 5.0.1 to comply with Apple's iCloud guidelines. Follow @steipete on Twitter for updates.
#include <sys/xattr.h>
/// Set a flag that the files shouldn't be backuped to iCloud.
+ (void)addSkipBackupAttributeToFile:(NSString *)filePath {
u_int8_t b = 1;
setxattr([filePath fileSystemRepresentation], "com.apple.MobileBackup", &b, 1, 0, 0);
}
/// Returns the legacy storage path, used when the com.apple.MobileBackup file attribute is not available.
+ (NSString *)legacyStoragePath {
@selaromdotnet
selaromdotnet / ResourceLinks
Created March 2, 2012 19:20
Kendo UI in Sitefinity