Sample documents in app bundle

Hi All,

I have a document based app and I would like to include a few small sample documents in the app bundle so that when a new user first installs and opens the app the doc folder with my apps name is pre-populated with a few example documents for them to open and explore. How can/should I do this?

Cheers

I use nowadays a data asset. To create a data asset add a "New data set" to (one of) your xcassets files, give it a name and add the data. In your app you can access the data by using the NSDataAsset class.

PS: This may not be a good solution for large data sets.

Roughly how many documents? And roughly how much disk space does each one take? Are the documents stored in a single file? Or do you use a package document format? (Like an Xcode project, where the document is actually a directory with a bunch of structure within it.)

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Sample documents in app bundle
 
 
Q