[英]Xcode command line install to device
I am trying to install an app from XCode onto my device from the command line. 我正在尝试从命令行将XCode的应用程序安装到我的设备上。 I have tried several of the "xcodebuild" command line options which do build, clean, install, etc fine.
我已经尝试了几个“ xcodebuild”命令行选项,它们确实可以进行构建,清理,安装等工作。 I have also searched for various solutions.
我还搜索了各种解决方案。
I was able to execute this command but it just builds to a folder. 我能够执行此命令,但它只是构建到一个文件夹中。
xcodebuild install -scheme "My App" -destination 'platform=iOS,id= mydeviceid '
xcodebuild install -scheme“我的应用”-目标'platform = iOS,id = mydeviceid '
I am able to take that folder from my hard drive and sync to the physical device using iTunes so all the build steps are being completed successfully. 我能够从硬盘驱动器中取出该文件夹,并使用iTunes同步到物理设备,因此所有构建步骤均已成功完成。 However, it does not "run" on the device like when Build and Run are executed in XCode.
但是,它不会像在XCode中执行Build和Run那样在设备上“运行”。
There are some 3rd party solutions but I can't believe there isn't some native xcodebuild switch to do that. 有一些第三方解决方案,但我不能相信没有某些本机的xcodebuild开关可以做到这一点。 Does anyone have suggestions?
有人有建议吗?
Thank you 谢谢
There is no native xcodebuild switch to install to a device. 没有要安装到设备的本机xcodebuild开关。
You need to fallback to third-party options: 您需要回退到第三方选项:
$ brew install ideviceinstaller
You can try to use Apple Configurator 2 (available in the App Store) and install the cfgutil
command line tool. 您可以尝试使用Apple Configurator 2(在App Store中可用)并安装
cfgutil
命令行工具。
Ignore the fact that ^ says "Uninstall Automation Tools...", if you haven't installed already, it will say "Install Automation Tools...". 忽略^表示“卸载自动化工具...”的事实,如果尚未安装,则会显示“ Install Automation Tools ...”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.