Copy a file from iPhone sandbox to Desktop?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 09:33:43

问题


I am developing an iPhone app for uni and we create an sqlite database file within the iPhone's sandbox directory.

Our application writes internally to this file, I am wondering how it would be possible to get this file back to my desktop. I don't really mind how it can be done, any way is fine. Maybe it is possible to even do something like emailing it from the app (if that is possible). Just a suggestion if anyone knows a way.

Thanks in advance.


回答1:


You can use the Organizer.

Connect your iPhone and choose Window->Organizer in Xcode.

Lots of options there, including what you're looking for. Specifically, click your iPhone under Devices, then in the Summary section find your app under Applications. Click the triangle next to your app which should reveal your Application Data with an arrow button to download it to your Mac.

Good luck!




回答2:


Oh it looks like I figured it out myself.

If you create the data in the iPhone Simulator, you can access all files here:

~/Library/Application Support/iPhone Simulator/User/Applications/*randomstring*/Documents

The random string is quite long and so just use trial and error to see which directory contains your application files.



来源:https://stackoverflow.com/questions/1548029/copy-a-file-from-iphone-sandbox-to-desktop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!