通过命令行在 iPhone 设备中安装应用程序

发布于 2024-12-05 08:36:05 字数 223 浏览 5 评论 0原文

我正在使用 xcodebuild install -alltargets -iphoneos4.2 -activeconfiguration Provisioning_profile=path_of_my_provisioningprofile code_sign_identity=identity。 该命令正在构建我的应用程序,我也正在获取构建文件(.app)。 但是如何从命令行将应用程序安装到设备中。 请帮助我解决这个问题。

I'm using xcodebuild install -alltargets -iphoneos4.2 -activeconfiguration provisioning_profile=path_of_my_provisioningprofile code_sign_identity=identity.
This command is building my app and i am getting build file (.app) also.
But how to install the app in to device from command line.
Please help me in this issue.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

十秒萌定你 2024-12-12 08:36:05

Fruitstrap 不再维护,要获得更新的项目,请查看 PhoneGap 的名为 ios-deploy

要安装,请运行:npm install -g ios-deploy

以下是如何使用它的一些示例:

// deploy and debug your app to a connected device
ios-deploy --debug --bundle my.app

// deploy and launch your app to a connected device, but quit the debugger after
ios-deploy --justlaunch --debug --bundle my.app

// deploy and launch your app to a connected device, quit when app crashes or exits
ios-deploy --noninteractive --debug --bundle my.app

// Upload a file to your app's Documents folder
ios-deploy --bundle_id 'bundle.id' --upload test.txt --to Documents/test.txt

Fruitstrap is no longer maintained, for a more up to date project checkout the fork by PhoneGap called ios-deploy.

To install run: npm install -g ios-deploy

Here are some examples of how to use it:

// deploy and debug your app to a connected device
ios-deploy --debug --bundle my.app

// deploy and launch your app to a connected device, but quit the debugger after
ios-deploy --justlaunch --debug --bundle my.app

// deploy and launch your app to a connected device, quit when app crashes or exits
ios-deploy --noninteractive --debug --bundle my.app

// Upload a file to your app's Documents folder
ios-deploy --bundle_id 'bundle.id' --upload test.txt --to Documents/test.txt
梦幻的心爱 2024-12-12 08:36:05

环顾四周发现https://github.com/benvium/libimobiledevice-macosx。这是从 libimobiledevice 到 MAC-OS X 的移植。它非常有用,并且不需要越狱。 :P

Looking around found https://github.com/benvium/libimobiledevice-macosx. This is a port from libimobiledevice to MAC-OS X. Its very useful and no jailbroken is needed. :P

蹲在坟头点根烟 2024-12-12 08:36:05

使用这个漂亮的脚本:http://gamua.com/blog/2012/03/how-to-deploy-ios-apps-to-the-iphone-via-the-command-line/
- 然后通过 USB 将 iphone 设备连接到运行此命令的 mac

要在命令行上启动应用程序:

instruments -w 4xxxxxxxx9 -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate NITC -e UIASCRIPT Launch-App.js

格式: instruments -w; -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate <应用程序名称>; -e UIASCRIPT Launch-App.js

我的 Launch-App.js 只有一行 - var target = UIATarget.localTarget();

这必须足以使用命令在设备上启动应用程序线

Use this beautiful script : http://gamua.com/blog/2012/03/how-to-deploy-ios-apps-to-the-iphone-via-the-command-line/
- Then connect iphone device via usb to mac running this command

To launch app on command line:

instruments -w 4xxxxxxxx9 -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate NITC -e UIASCRIPT Launch-App.js

format : instruments -w <deviceid> -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate <applicationname> -e UIASCRIPT Launch-App.js

My Launch-App.js has only one line - var target = UIATarget.localTarget();

This must be sufficient to launch application on device using command line

眼泪都笑了 2024-12-12 08:36:05

怎么样:

如何使用命令行将 ipa/app 文件安装到 iPhone 中?

使用 libimobiledevice 的第三种解决方案。

What about this:

how to intall an ipa/app file into iPhone with command line?

Third solution with libimobiledevice.

抚笙 2024-12-12 08:36:05

ipatoolhttps://github.com/majd/ipatool

步骤 1 :搜索应用程序包 ID

 ./ipatool search testflight --limit 1

> ==> ℹ️    [Info] Searching for 'testflight' using the 'US' store front...
> ==> ℹ️    [Info] Found 1 result:
> 1. TestFlight: com.apple.TestFlight (3.1.0).

第 2 步:下载 IPA

./ipatool download --bundle-identifier com.apple.TestFlight 

Easy!

ipatool: https://github.com/majd/ipatool

Step 1: Search the app bundle id

 ./ipatool search testflight --limit 1

> ==> ℹ️    [Info] Searching for 'testflight' using the 'US' store front...
> ==> ℹ️    [Info] Found 1 result:
> 1. TestFlight: com.apple.TestFlight (3.1.0).

Step 2: Download the IPA

./ipatool download --bundle-identifier com.apple.TestFlight 

Easy!

忘羡 2024-12-12 08:36:05

在 MAC 上安装以下软件包

brew install libimobiledevice  
brew install ideviceinstaller 

成功安装以上软件包后。

使用以下命令在 iOS 设备上安装 .ipa 文件:

ideviceinstaller -i <Path_to_your_ipa>

谢谢

Install following packages on MAC

brew install libimobiledevice  
brew install ideviceinstaller 

After successfully installed above packages.

Use following command to install .ipa file on iOS devices:

ideviceinstaller -i <Path_to_your_ipa>

Thanks

尾戒 2024-12-12 08:36:05

如果您正在编写 Flutter 应用,请按照这些说明操作在 flutter.dev 上设置您选择的 IDE(包括在 XCode 中设置您的签名密钥)。在 IDE 中运行后,您可以通过以下步骤在连接的设备上构建并启动应用程序:

  • 通过运行 flutter devices 查找您的设备 ID 并复制第二个中列出的十六进制字符串柱子。
  • 从项目的源目录中,运行:flutter -d DEVICE_ID run --release (或将 --release 更改为 --debug构建并部署调试版本)。

flutter 命令将处理生成 XCode 来编译应用程序。它的运行速度不会比 XCode 通常的运行速度快(根据我的经验)。

请确保设备与 Mac 保持连接,无论是通过 USB 电缆还是通过共享无线网络。

If you're writing a Flutter app, follow these instructions at flutter.dev to set up your IDE of choice (including setting up your signing key in XCode). After you have it working in an IDE, you can then build and launch the app on a connected device by these steps:

  • Look up your device ID by running flutter devices and copy the hex string listed in the second column.
  • From the source directory of your project, run: flutter -d DEVICE_ID run --release (or change --release to --debug to build and deploy the debug version).

The flutter command will handle spawning XCode to compile the app. It will not run any faster than XCode usually does (in my experience.)

Be sure to keep the device connected to your mac, whether via a USB cable, or over a shared wireless network.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文