[英]How to install an ipa/app file into iPhone with command line?
I want to know how to install an ipa/app file into iPhone just using the command line? 我想知道如何使用命令行将ipa / app文件安装到iPhone中?
The device maybe without jailbreak or jailbroken already. 该设备可能没有越狱或已越狱。
I tried to use the command line: xcodebuild
, but failed. 我尝试使用命令行:
xcodebuild
,但失败了。 I didn't find the parameter how to set the destination, maybe a real device, not a simulator. 我没有找到参数如何设置目的地,可能是真正的设备,而不是模拟器。
What options do I have? 我有什么选择?
Three ways I know of: 我知道的三种方式:
These guys wrote a tool in Ruby to do it. 这些人在Ruby中编写了一个工具来完成它。 It uses the Fruitstrap library which in turn uses one of Apple's private APIs, so this could possibly break in the future.
它使用Fruitstrap库,而该库又使用Apple的私有API之一,因此将来可能会破坏。
You can also just use Fruitstrap on its own, but then you need an .app directory, whereas the Transporter Chief tool I linked above supports both .app and .ipa deployments (as required in your answer). 你也可以单独使用Fruitstrap,但是你需要一个.app目录,而我上面链接的Transporter Chief工具支持.app和.ipa部署(根据你的答案要求)。
In either case, you need to have XCode installed for it to work, but the device does not need to be jailbroken. 在任何一种情况下,您都需要安装XCode才能工作,但设备不需要越狱。
Thirdly, there is also a binary distribution for OS X of the libimobiledevice
library, which enables Linux boxes to talk to iOS devices. 第三,
libimobiledevice
库的OS X还有一个二进制发行版 ,它使Linux盒子可以与iOS设备通信。 This has a few different tools, one of which can install valid signed IPAs to the device using this syntax: 这有几个不同的工具,其中一个可以使用以下语法将有效的签名IPA安装到设备:
ideviceinstaller -i myapp.ipa
The advantage of this method is that it does not need XCode or even iTunes. 这种方法的优点是它不需要XCode甚至iTunes。
With the new Apple Configurator 2 application, you can Install Automation Tools... from the menu. 使用新的Apple Configurator 2应用程序,您可以从菜单中安装自动化工具.... This will add support for the command-line tool "cfgutil".
这将添加对命令行工具“cfgutil”的支持。
cfgutil allows you to install ipa's from the command-line using cfgutil install-app <AbsolutePathToIpa>
. cfgutil允许您使用
cfgutil install-app <AbsolutePathToIpa>
从命令行安装ipa。 We use it on our build server to automatically update the device with the latest build. 我们在构建服务器上使用它来自动使用最新版本更新设备。
I've just gathered in a single post (Gist) how to achieve this, using 我刚刚收集了一篇文章(Gist)如何实现这一点,使用
1.- Mattt's library Shenzhen 1.- 马特的图书馆 深圳
2.- Phonegap's library ios-deploy 2.- Phonegap的库 ios-deploy
Read here: 在这里阅读:
I've tried libimobiledevice-macosx. 我试过libimobiledevice-macosx。 works fine on iPhone 5. iOS version 6.1.4.
适用于iPhone 5. iOS版本6.1.4。 I was able to install app and see log output like in xcode :) Thank you!
我能够安装应用程序,并在xcode中看到日志输出:)谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.