Is there a limit of how many files can be included in an app? Is it OK to have 20K small files in the app (only 10 at most will be read at the same time), and how does it impact the performance?
No, there is actually not such a limit. It does not affect the performance of the app unless you don't read them all at the same time :) Good Luck!
There is no limit on number of files that can be stored in the app bundle. Performance wise I'd say no issue as long as you do not perform file IO on main thread. You can use NSOperation
and queue or GCD to perform the file read/write routines.
The only limitation, to say, would be the OTA limit which is 50MB. If your application file size exceeds this limit, your app cannot be installed via OTA.
PS: I do not know why you are storing 20K files, but as suggested by Wain in his comment, you can definitely check if using CoreData/SQLite can suffice.
Hope that helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With