Storing data on iOS

ddas dev at digifilm.com
Wed Jul 25 22:12:17 EDT 2012


They will notice and they will reject your app.

The only way around is to set the extended attribute of your folder in the documents folder to "do not back up." 
I brought up this issue in December. However it seems like the prob has been recently solved by mergext.

http://mergext.com/home/mergxattr/

-Debdoot

PS: Here is another way.

Listing 1  Setting the Extended Attribute

#include <sys/xattr.h>
- (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL
{
    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;
}



On Jul 25, 2012, at 7:28 PM, J. Landman Gay wrote:

> Thanks for all the suggestions everyone. If the cache is unlikely to get erased very often then I think the simplest thing is to just use that.
> 
> BTW, Chipp, I wasn't too worried about the file storage not working, I was concerned that Apple would reject the app for storing data in Documents if it wasn't generated by the user. I'm never sure just how picky the Apple police are going to be -- or if they'd even notice.
> 
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list