I've already have Xcode tools installed on my mac and now I can build my iOS game project like this:
xcodebuild -scheme "Game Scheme"
and the next thing I want is to install and run the generated app (using the command above) on a real device (connect to mac).
I'm wondering if there is a command such as (I read the document about xcrun but still can not figure out how to get this done):
xcrun "my game.app" -l
to install the game on my device, run it, and print all the logs in my terminal just like Xcode did in the console.
Any advice will be appreciated, thanks :)
When you run an application in Xcode, the debugger is automatically started and attached to the process of the application. Click the Run button in the top left or press Command + R. From the moment the application is up and running, we can start inspecting the process and, if necessary, debug it.
Go to Xcode → Preferences → Debugging → On Start → "Show Console".
The Command Line Tools Package is a small self-contained package available for download separately from Xcode and that allows you to do command line development in macOS. It consists of the macOS SDK and command-line tools such as Clang, which are installed in the /Library/Developer/CommandLineTools directory.
Doing so is a complicated process that requires reverse-engineering the MobileDevice framework interface or the underlying protocols.
Fortunately, various parties have done the work for you.
https://github.com/phonegap/ios-deploy
http://www.libimobiledevice.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With