开发者

How to place a resourse in the applicationDocumentsDirectory

I have an App that will come with a video clip. The user will be able to add video clips at a later stage. These will end up in the applicationDocumentsDirectory. How, and where, do I place the first clip so it ends up 开发者_如何转开发in the right place? The clip is about 25Mb so I don't really want to duplicate it.


You have to include your video clip in application bundle. And now you have several choices ...

1) Modify video clips list

When your application will be creating list of local video clips for the user, just prepend this bundled video clip to this list.

2) Copy

You can copy your video clip from application bundle to application documents directory during application startup. If it isn't already there. But this will duplicate your video clip on device - space wasting. Maybe you can link it only, but I didn't try it on iOS.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜