ios - How can I provide demo data with my app without backing it up to iCloud? -


i have app in app store since january, copies database file "documents" directory @ first launch.

this database used store "presets", created users. each preset can have 129 photos.

at start, app comes "default preset", users can use understand , start use app. preset "gift" user, , if doesn't want anymore, can delete it.

on update 2.0.2 nothing changed in schema, apple rejected update now.

2.23 - apps must follow ios data storage guidelines or rejected

i can't figure out how can solve this. issue seems default preset, apple considers "temporary" gets backed icloud. preset not temporary. must persist, , part of database.

i can't mark database "do not up", because way "presets" created users won't backed up, terrible.

anybody have idea how solve this?

you need flag file not backup icloud.

without flagging file such, eligible backup icloud. apple has began enforce this.

if app generates lot of data, on app startup, they'll reject it. apple's reasoning any data can regenerated should not backed icloud.

to prevent this, apple recommends:

- (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 %@ backup %@", [url lastpathcomponent], error);     }     return success; } 

other blanket omission icloud, thing you're left separating user generated content re-creatable content.


Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -