BlueChips23
BlueChips23

Reputation: 1951

iOS App Rejected - Data Storage Guidelines

My iPhone app was rejected last week because of me not following iOS Data Storage Guidelines. My app basically searches for certain data and shows them to the user who can share them with others (Twitter, Email, etc) or save them to "Favorites" to view them later.

Earlier:

Earlier, I didn't follow any particular data strategy. My app was basically downloading all search data (images) into /Documents/ directory. Once the user marked a particular item as a "Favorite", those were saved into my custom made "Favorites" directory in /Documents/ path. My app doesn't use iCloud. Besides, I also forgot to purge downloaded search data (images) once the user has seen them and is no longer in the same view. I have since found out that the entire strategy was terrible and the reason for my app's rejection.

Now:

Now, since my app has been rejected, I have doubled down on fixing my app and making it as perfect as possible. The data strategy that I am following is very simple now:

a) All the downloaded search data (images and pList files for search results) are now created in /Library/Caches directory.

b) When the user adds an item to "Favorites", data associated with that item (image and text) are then saved into /Documents/ directory.

c) All the files in /Library/Caches and /Documents/ directories are marked with the attributed "Do not backup", since I don't want to take any space on iCloud.

d) All the search related data in /Library/Caches directory are immediately purged once the user moves to a different view and is not longer accessing the search results.

e) On app launch, I check to see if there are any residual files from previous session in /Library/Caches directory in case the app got terminated prematurely. If any residual files from previous search session are found, I delete them.

My question are:

A) Is the data storage strategy that I am following now acceptable?

B) Do I need to mark any search related files in /Library/caches/ with "Do not backup" attribute or is that unnecessary?

C) Should I mark the data related to user's favorite items in /Documents/ directory with "do not backup" attribute or is it okay if user's favorite items get backed up to iCloud?

Upvotes: 3

Views: 682

Answers (1)

brynbodayle
brynbodayle

Reputation: 6626

A) This data strategy sounds much better with maybe one minor adjustment listed below.

B) You do not need to mark these files with the "Do not backup" attribute. Also, you do not even need to manually purge these files. These files are not backed up through iTunes or iCloud, and will only be cleared in certain extreme cases of low disk space.

C) The user's favorite items should certainly be backed up to iCloud. This would be a proper use of iCloud since it is intentionally for user generated content.

Upvotes: 5

Related Questions