Note that there are some explanatory texts on larger screens.

plurals
  1. POGood way to manage the Documents/Inbox folder in an iOS app
    primarykey
    data
    text
    <p>When a file is passed into an iOS application by the document interaction system, a copy of the file is stored in the application bundle's <code>Documents/Inbox</code> folder. After the application has processed the file, it obviously needs to remove the file from <code>Documents/Inbox</code>, otherwise the folder will continue to grow and waste storage on the device.</p> <p>I am uncomfortable with this simple solution (A), however, because my app needs to interact with the user before it can finish processing and removing the file. If the user suspends the app during this interaction period, and the app then gets killed while it is in the background, the stale file will not be removed when the app starts up the next time. Of course I can improve my app to cover this scenario, but I suspect that there will always be another border case that will leave me with an "unclean" <code>Documents/Inbox</code> folder.</p> <p>A preferrable solution (B) therefore would be to remove the <code>Documents/Inbox</code> folder at an appropriate time (e.g. when the app launches normally, i.e. not via document interaction). I am still uncomfortable with this because I would be accessing a filesystem path whose location is not officially documented anywhere. For instance, my app would break if in a future version of iOS the document interaction system no longer places files in <code>Document/Inbox</code>.</p> <p>So my questions are:</p> <ol> <li>Would you recommend solution A or B?</li> <li>Do you use a different approach and can you maybe give an outline of how your app manages <code>Document/Inbox</code>?</li> <li>Last but not least: Do you know a piece of official Apple documentation that covers the topic and that I have overlooked?</li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload