ios 如何使用命令行将 ipa/app 文件安装到 iPhone?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14535392/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install an ipa/app file into iPhone with command line?
提问by roastjj
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. I didn't find the parameter how to set the destination, maybe a real device, not a simulator.
我尝试使用命令行:xcodebuild
,但失败了。我没有找到如何设置目的地的参数,可能是真机,而不是模拟器。
What options do I have?
我有哪些选择?
回答by user533676
Three ways I know of:
我知道的三种方式:
These guys wrote a toolin Ruby to do it. It uses the Fruitstraplibrary which in turn uses one of Apple's private APIs, so this could possibly break in the future.
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).
这些人用 Ruby编写了一个工具来做到这一点。它使用Fruitstrap库,而该库又使用 Apple 的私有 API 之一,因此这在未来可能会中断。
您也可以单独使用 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 Xof the
libimobiledevice
library, which enables Linux boxes to talk to iOS devices. This has a few different tools, one of which can install valid signed IPAs to the device using this syntax:ideviceinstaller -i myapp.ipa
The advantage of this method is that it does not need XCode or even iTunes.
回答by fguchelaar
With the new Apple Configurator 2 application, you can Install Automation Tools...from the menu. This will add support for the command-line tool "cfgutil".
使用新的 Apple Configurator 2 应用程序,您可以从菜单中安装自动化工具...。这将增加对命令行工具“cfgutil”的支持。
cfgutil allows you to install ipa's from the command-line using cfgutil install-app <AbsolutePathToIpa>
. We use it on our build server to automatically update the device with the latest build.
cfgutil 允许您使用cfgutil install-app <AbsolutePathToIpa>
. 我们在构建服务器上使用它以使用最新构建自动更新设备。
回答by Sophy Swicz
I've just gathered in a single post (Gist) how to achieve this, using
我刚刚收集了一篇文章 (Gist) 如何实现这一点,使用
1.- Mattt's libraryShenzhen
1.-马特图书馆深圳
2.- Phonegap's libraryios-deploy
2.- Phonegap 的库ios-deploy
Read here:
在这里阅读:
回答by 0x8BADF00D
I've tried libimobiledevice-macosx. works fine on iPhone 5. iOS version 6.1.4. I was able to install app and see log output like in xcode :) Thank you!
我试过 libimobiledevice-macosx。在 iPhone 5.iOS 版本 6.1.4 上工作正常。我能够安装应用程序并看到像 xcode 一样的日志输出 :) 谢谢!