xcode 通过命令行从 iOS 设备卸载应用程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15886373/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:09:58  来源:igfitidea点击:

Uninstalling app from iOS Device thru command line

iosxcodemacoscommand-lineuninstall

提问by Mano Tester

I'm running test on an app using UIAutomation, but I need a way to uninstall the app in a device (iPhone, iPad, iPod) without using jailbreak.

我正在使用 UIAutomation 在应用程序上运行测试,但我需要一种方法来卸载设备(iPhone、iPad、iPod)中的应用程序而不使用越狱。

Currently I′m using fruitstrap to upload the app to a cable connected device using the device UID.

目前我正在使用 Fruitstrap 将应用程序上传到使用设备 UID 的有线连接设备。

Is there a way thru a command line (yes it MUST be command line) to delete the app from the device?

有没有办法通过命令行(是的,它必须是命令行)从设备中删除应用程序?

回答by Simone Conti

Use the fantastic mobiledevicetool!

使用神奇的mobiledevice工具!

mobiledevice repo on GitHub

GitHub 上的移动设备存储库

It compiles in seconds and it let you interact with the connected iOS devices very easily.

它可以在几秒钟内编译,让您可以非常轻松地与连接的 iOS 设备进行交互。

回答by user2661518

Use ideviceinstaller

ideviceinstaller

To install app: ideviceinstaller -i testApp.ipa

安装应用程序: ideviceinstaller -i testApp.ipa

To uninstall app: If you don't know bundle id, first get bundle id ideviceinstaller -lthen

卸载应用程序:如果您不知道 bundle id,请先获取 bundle id ideviceinstaller -l然后

ideviceinstaller -U com.testPackage.testApp

ideviceinstaller -U com.testPackage.testApp

回答by Darpan

New Kid on the block - ios-deploy

MobileDevice was a good tool, however not being actively developed. ios-deploy works great.

New Kid on the block - ios-deploy

MobileDevice 是一个很好的工具,但是没有被积极开发。ios-deploy 很好用。

Here is the command -

这是命令 -

ios-deploy --id <device_id> --uninstall_only --bundle_id com.app.testapp

(ios-deploy is forked from fruitstrap only)

(ios-deploy 仅从 Fruitstrap 分叉)

回答by Christian Raab

For those who still get here by google: You can installe the ruby gem ios_app_installer (which is a "light" version of ios-deploy) and after installing it use the command

对于那些仍然通过 google 到达这里的人:您可以安装 ruby​​ gem ios_app_installer(这是 ios-deploy 的“轻量级”版本)并在安装后使用命令

ios_app_installer -b <bundle id> -u

(The device may have to be connected via USB)

(该设备可能必须通过 USB 连接)

回答by user2325313

Via command line: uninstall [-i/--id device_id] -b/--bundle bundle.app

通过命令行: uninstall [-i/--id device_id] -b/--bundle bundle.app

Removed the specified bundle identifier (eg com.foo.MyApp) from the specified device, or all attached devices if none are specified.

从指定的设备或所有连接的设备(如果没有指定)中删除指定的包标识符(例如 com.foo.MyApp)。

Used thisrepository Note: works with SDK 6.1.3 but not with SDK 6.1.4

使用存储库注意:适用于 SDK 6.1.3 但不适用于 SDK 6.1.4