开发者

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

开发者 https://www.devze.com 2023-02-25 21:29 出处:网络
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?

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:

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


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 ev开发者_StackOverflow社区erything). Yet when I use the finder to try to locate the file... no deals! This is really bizarre. Any ideas?


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.


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号