PDA

View Full Version : Append zip file to Documents folder?




milani
Aug 7, 2011, 04:27 AM
Warning: 100% XCode noob.

I have a ZIP file stored in a directory in my app package. I want that zip file to be moved (or copied) to the Documents directory of my iPhone app for iTunes File Sharing.

I've activated all of the iTunes sharing settings, so everything is good on that end. Basically, I'm just looking for a simple way to append my zip file to the Documents directory when the app is complied and/or opened for the the first time.

If anyone can help me out I would really appreciate it.



holmesf
Aug 7, 2011, 10:47 PM
Warning: 100% XCode noob.

I have a ZIP file stored in a directory in my app package. I want that zip file to be moved (or copied) to the Documents directory of my iPhone app for iTunes File Sharing.

I've activated all of the iTunes sharing settings, so everything is good on that end. Basically, I'm just looking for a simple way to append my zip file to the Documents directory when the app is complied and/or opened for the the first time.

If anyone can help me out I would really appreciate it.

Have you looked at NSFileManager?

milani
Aug 12, 2011, 11:42 PM
Have you looked at NSFileManager?

Yes, but I'm not entirely sure how to get NSFileManager to do what I need it to do.

Basically I want the app to put a group of files (or just a single zip file if that is easier) into the Documents folder when the app loads. I had planned to include a set of instructions, encouraging the user to plug their phone into iTunes in order to access the files (via the File Sharing UI in the iTunes app).

One caveat (which may or may not have any effect on things): I'm developing the app with PhoneGap (so building the actual app in a UIWebView with HTML, CSS, and JS (because of my general lack of confidence with Xcode).