iOS - Data Storage Guideline for user created images part of navigation stack

78 Views Asked by At

In our current iOS application, we do image manipulation like cropping, resize for a search functionality. Follow is the way, we have current handled to reduce dirty memory.

1) SearchImageController - which shows the cropped image from the previous screen.

2) Multi such image could be part of the navigation stack. So in order to reduce the dirty memory, we wrote the file to disk 'CACHE/app-images' directory of the application

  • Why not 'Application' Documents directory ? - This is not a user related document, this is used to search for some products to navigate forward in the journey.

  • We clear of the 'CACHE/app-images' directory during the app launch (after crash).

Questions:

1) The only problem we see, that the CACHE directory can be cleaned by iOS when there is disk space problem. So some of the images part of the navigation stack could be lost. Can this problem lead to app rejection if the app doesn't crash on back ?.

2) Does this data should be under 'DOCUMENT' or 'CACHE' directory ?. If this has to under 'DOCUMENT', I saw some apps getting rejected for occupying more memory under 'DOCUMENT' directory.

3) I hope the exclusion flag for iCloud storage is not required for 'CACHE' directory.

0

There are 0 best solutions below