incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacob G (Created) (JIRA)" <>
Subject [jira] [Created] (CB-522) Support option not to back up local storage to iCloud
Date Tue, 17 Apr 2012 17:19:19 GMT
Support option not to back up local storage to iCloud

                 Key: CB-522
             Project: Apache Callback
          Issue Type: Improvement
          Components: iOS
    Affects Versions: 1.6.0
            Reporter: Jacob G
            Assignee: Shazron Abdullah
             Fix For: 1.6.1

In 1.6.0, PhoneGap/Cordova implemented a workaround for an iOS 5.1 bug dealing with local
storage persistence by copying the local storage cache file to a persistent folder. This workaround
results in the local storage file to automatically be backed up to iCloud. Developers may
not want this file backed up to iCloud is certain scenarios (such as device uniqueness), and
there should be an option to not back up to iCloud but yet still maintain persistent integrity
on that device.

In code, this can be accomplished by the following:

            // Mark Documents folder with special attribute to tell iOS not to back up to
            const char* cstr = [documentsDirectory UTF8String] ;
            const char* attrName = "";
            u_int8_t attrValue = 1;
            int result = setxattr(cstr, attrName, &attrValue, sizeof(attrValue), 0, 0);
// 0 is success, -1 is failure
            if(result != 0){
                NSLog(@"Error: Documents folder could not be set to not backup to iCloud");

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message