Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Releasing IOS app with files in Library directory

Tags:

ios

ios4

I have an app that is going to display a list of local video files. The app will only have a couple of video files at first, but that number will grow with future updates and in-app purchases. I would like to store all these videos in 1 place and it makes sense to put them in the app's Library directory so they are not user-accessible. Is it possible to publish an app with files already in the app's Library directory? Or do I have to put them in the app's bundle and then copy them to the Library directory when the app is first launched? Although that would result in the 2 videos files being duplicated since I can't remove them from the bundle.

like image 242
Mike Milam Avatar asked Nov 05 '22 02:11

Mike Milam


1 Answers

Yes, you do need to copy the files from the app bundle into the Library if you want to treat all the videos in the same way. You cannot change the contents of the app bundle from inside your app and the only files your app has when it first launches are those that are in the app bundle.

If you really wanted (and if the video files don't change), you could make special cases in your code to be able to get the starting videos from the app bundle and the in-app purchase downloaded videos from the Library directory. But, unless the video files are quite large this seems a bit excessive.

A third option would be to have the user download the starter files on first app launch, but that may be suboptimal for other reasons.

like image 192
Simon Goldeen Avatar answered Nov 12 '22 18:11

Simon Goldeen