Where does the iPhone simulator keep it's tmp/ files?

好久不见. 提交于 2019-12-11 21:28:12

问题


I'm running my iPhone app on the simulator to record my voice. It saves the recording to a .wav file, but I don't know where that is on my machine. Any help?


EDIT 1

Please keep in mind that I'm trying to 'simulate' the experience on a device. So my use of directories is crucial. See my output to the console:


EDIT 2

This is really strange. I just tried to record my voice with the Speak Here example project ('out of the box') and it worked (played back my voice and everything). Yet when I use the finder to try to locate the file... no deals! This is really bizarre. Any ideas?


回答1:


Try this path /Users/<your_username>/Library/Application Support/iPhone Simulator/. In available dirs there look for /Applications/<your_app>/Documents.

UPDATE (27th Jan, 2013):

  • If you're OK with Terminal, install awesome ruby gem by Paul Samuels: http://paul-samuels.com/blog/2012/08/19/ios-simulator-directory-command-line-tool/.
  • If you're not OK with Terminal, Paul has also created an excellent
    workflow for Alfred 2.app: http://paul-samuels.com/blog/2013/01/24/sidir-alfred-workflow/.
  • If you're having hard time installing Paul's gem, follow this
    tutorial: http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac.



回答2:


The location of simulator files has changed in Xcode 6. It's now at:

~/Library/Developer/CoreSimulator/Devices

See this answer for details:

https://stackoverflow.com/a/24291087/2410555




回答3:


The easiest way in my experience is to output the value of NSTemporaryDirectory() somewhere in your code. That gives you the complete path to the /tmp folder for your user and application.



来源:https://stackoverflow.com/questions/5653087/where-does-the-iphone-simulator-keep-its-tmp-files

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