The Situation: I have an iOS app that deals with files and lets the user save, edit, open and perform various operations with these files. I d like to be able to have some pre-made documents for the user to look at when they open the app (ex. a template) alongside their own custom documents.
The Problem: How can I create a document (or template file) and have it appear in the Documents folder after the user installs my app and launches it (and all preceding times)?
Background: This document (the one that d be installed into the app s documents directory) is created by me, not the user.
我知道要做到这一点,你需要将它保存在包中,然后当你的应用程序第一次悄悄地复制到文档目录中。我是否应该把它复制到 Appdudie Finish Launching withOptions 方法中,或者在我看来,是否Load 方法并写逻辑来检测它是否第一次运行?
My Code: At this webpage: http://textsnip.com/d35fbc But when it runs, it always says: "File does not exist [in documents folder]", then it tells me that it s being copied. The problem is that when I examine the app s documents folder it is never there, it s still in the bundle.
Why won t it copy with this code How does this work?