Including a data file with an iOS app

I have an iOS application that I would like to submit to the Apple app store that needs to read data stored in a few data files to work correctly. How do I include these data files in the distrubtion that is downloaded to the user through the app store?


To be specific I would like to include a couple of files containing a catalog of stars, their locations in the ********* sphere, their names, magnitudes etc. The application reads these files on start up and needs them in order to work correctly.

Although I could conceivably do so, I would prefer not to compile the data directly into the application.

I am sure there is a way of including the file in the app bundle just like all the "Copy Bundle Resources" files - but I don't know how. What I did was use a public CloudKit record. I wrote code in the app to grab the file and post it up to CloudKit. Ran that code just once*. The app routinely looks at the CloudKit record for the information. This has the advantage that I can alter the file anytime I want and the information is immediately available to all deployed apps.


*In your case you could continually add stars.

PBK,


Thank you! An interesting idea that I will consider. I'll have to investigate the CloudKit before I know for sure that it's what is bet for my app.


No matter what I'd still like to know how to include data files with a distribution. You'd think that it would be well documented, and maybe it is, but I'm having a hard time finding the correct place in the documentation to look for the answer.

Including a data file with an iOS app
 
 
Q