简体   繁体   English

Xcode命令行安装到设备

[英]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: 您需要回退到第三方选项:

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.

相关问题 如何在没有Xcode的设备上的命令行上使用lldb调试iOS应用程序 - How to debug an iOS app with lldb on the command line on a device without Xcode Mac 使用 iOS SDK 为 xcode 安装命令行工具 - Mac install command line tools for xcode with iOS SDK Xcode 构建失败并且重复需要命令行开发工具安装 - Xcode build fails and repetitive requires command line developer tools install 如果我已经有 Xcode,是否需要单独为 Xcode 安装命令行工具 - Do i need to install Command Line Tools for Xcode separately if i already have Xcode xcode命令行编译 - xcode command line compilation Xcode-命令行构建 - Xcode - command line build Xcode命令行上传/下载iOS设备应用程序沙箱中的文件 - Xcode command line upload/download files to/from an iOS Device Application Sandbox Xcode 13 命令行替换“instruments -w”以在带有模板的真实 iOS 设备上运行 - Xcode 13 command line replacement for 'instruments -w' to run on a real iOS device with a template 无法在命令行上安装和运行模拟器上的iOS应用程序 - 适用于小牛队的iOS 6.1 Xcode 5的模拟器 - Unable to install and run iOS app on Simulator from command line - Simulator of iOS 6.1 Xcode 5 on mavericks 如何通过命令行从src,.app或.ipa安装iOS应用程序到硬件设备 - How to install iOS application from src, .app, or .ipa via command line to hardware device
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM