Moving archives from Mac OS X to iPhone OS
My iPhone application has a fair amoun开发者_如何学JAVAt of data that it needs to run, which I would like to store in the bundle as archives, and unpickle the data when the application starts up. Can I create these archives (which include instances of custom classes) on a Mac OS X system, and read them from the iPhone app?
If your question is: can you create archive files on the Mac, then ship them in your app's bundle, and have code on the iPhone access those bundled files, the answer is: sure, why not?
If your question is: can you have these archives live on the Mac, and have your iPhone app go find and download them when it first runs, the answer is: maybe, but it's much harder. And doesn't work too well for users whose devices aren't online when they try to run the app.
精彩评论