Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I will tell you how will I do it but before I would like to give you a <strong>warning</strong> about downloading files from the Internet and storing them in your app.</p> <p>I got one of my apps rejected from Apple lately because I violated rule 2.23 from the <a href="https://developer.apple.com/appstore/resources/approval/guidelines.html" rel="nofollow noreferrer">App Store Review Guidelines</a> which says:</p> <blockquote> <p>2.23 Apps must follow the <a href="https://developer.apple.com/icloud/documentation/data-storage/" rel="nofollow noreferrer">iOS Data Storage Guidelines</a> or they will be rejected</p> </blockquote> <p>Since Apple is using iCloud lately you should minimize the traffic that each app will upload and therefore you should not have more than 40MB stored in your Documents folder of your app. They also say (if you read the links I provided):</p> <blockquote> <p>Data that can be downloaded again or regenerated should be stored in the /Library/Caches directory.</p> </blockquote> <p>And since the cache folder can be deleted by the iOS if needed, you should design your app to be prepared to download the images again in case they are gone, so keep this in mind.</p> <p>Now for my solution, I think downloading 1000 files is too much (even if they are small files). I suggest that you have the files saved in a ZIP file on the server from which you are willing to download and unzip them on your disc once downloaded. This will be much easier and more practical. You can look <a href="https://stackoverflow.com/questions/5029917/zip-and-unzip-a-file-programmatically-in-iphone">here</a> to see how to zip and unzip in your app.</p> <p>After you have your files unzipped I suggest to have a small database (SQLite) from which you can load load the file names, store these names in an array, and then use this array to fill the images in your table in the function <code>cellForRowAtIndexPath</code>.</p> <p>I hope this helps you. By the way, it is my way to do it but I am not saying it is the "best way" as you are asking :)</p>
    singulars
    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.
    1. VO
      singulars
      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