Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add files to the /Document folder in the iPhone Simulator for testing

I am writing an app that works on documents. On the real iPhone I can add documents on the Documents folder of the App using iTunes. But for testing I need to load some files in the Documents folder of my app in the simulator. How can I do that?

like image 889
CuriousMarc Avatar asked Dec 07 '25 23:12

CuriousMarc


1 Answers

Duh. Found out all by myself. It's well hidden. Run you app in the simulator at least once. THen Put them in the following folder (assuming you are using 5.1 iOS target in this example):

/Users/your_user_name/Library/Application Support/iPhone Simulator/5.1/Applications/some_alphanum_code_representing_your_app/Documents

A workaround I used before finding this is to add the documents files to the XCode projects, which would copy them to the main bundle. Then I copy them programmatically from the main bundle path to the /Document path.

like image 133
CuriousMarc Avatar answered Dec 09 '25 18:12

CuriousMarc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!