问题
I might be going about this wrong, but I am trying to run an iOS app in the Xcode 6 iOS simulator in order to record a video tutorial of the app. I have xCode installed and can launch the iOS simulator, but there seems to be no way to install an .app file. The ~/Library/Developer/CoreSimulator folder is a complete mystery and there is no clear location to drop the app files.
Any ideas?
Alternatively, is there an easier way to record a video of your iOS app? People must do it all the time for tutorials...
Thanks
回答1:
If you were running the app on a device, you could use the new Yosemite feature to record over USB to QuickTime.
However, as you are using the simulator, you will need to a partial screen recording in QuickTime.
Using QuickTime
Launch QuickTime then go to File > New Screen Recording. You can either click to select the whole screen, or drag to only record a portion of the screen.
Alternatives
If you want more flexibility, you will need to use 3rd party software like ScreenFlow.
回答2:
From Xcode 8.2,You can take a screenshot or record a video of the simulator window using the xcrun command-line utility.
Launch your app in Simulator.
Launch Terminal (located in /Applications/Utilities), and enter the appropriate command:
To take a screenshot, use the screenshot operation:
xcrun simctl io booted screenshot
You can specify an optional filename at the end of the command.
To record a video, use the recordVideo operation:
xcrun simctl io booted recordVideo <filename>.<extension>
To stop recording, press Control-C in Terminal.
Note: You must specify a filename for recordVideo.
The default location for the created file is the current directory.
For more information on simctl, run this command in Terminal:
xcrun simctl help
For more information on the io subcommand of simctl, run this command:
xcrun simctl io help
Check this link for more details.
回答3:
You can use 'Build & Run' in Xcode to install and run your app in the iOS Simualtor.
Alternatively, you can run xcrun simctl install <Device UDID> <Path to app> to install your app. See xcrun simctl help for more information.
Regarding recording a screen capture video, you should use QuickTime.
来源:https://stackoverflow.com/questions/26523622/how-can-i-run-record-an-ios-app-in-the-xcode-6-ios-simulator