Releasing an iOS Application with Files in the Library Directory

I have an application that will display a list of local video files. At first, the application will have only a few video files, but this number will increase with future updates and in-app purchases. I would like to save all these videos in one place, and it makes sense to put them in the application library directory so that they are not accessible to the user. Is it possible to publish an application with files already in the application library directory? Or do I need to put them in an application package and then copy them to the library directory when the application is launched? Although this will lead to duplication of the two video files, since I can not remove them from the package.

+5
source share
2 answers

Yes, you need to copy files from the application package to the library if you want to process all the videos in the same way. You cannot change the contents of the application package from your application, and only the files that your application has on first launch are those that are in the application bundle.

If you really wanted to (and if the video files do not change), you can make special codes in your code to be able to start the initial clips from a set of applications and load the video in the application from the catalog library. But, if the video files are quite large, this seems a little excessive.

The third option is for the user to download the starter files the first time the application is launched, but this may be suboptimal for other reasons.

+3

, . , , .

iOS ?

-1

All Articles