首页 > 解决方案 > 从终端命令启动 ios ipa

问题描述

我将使用 Ranorex 自动执行我的应用程序测试。为此,我需要在我的 ios 设备上启动 RanorexServiceApp,然后才能启动我的测试脚本。如何从我的 mac 终端启动 RanorexServiceApp?ps.:语法不好见谅。

我尝试使用 airtest、ios-tagent、ideviceinstaller、ios-deploy、libimobiledevice 并失败了。

标签: ioscommandlaunching-application

解决方案


首先确定您要使用的设备:

xcrun simctl list

这将为您提供设备列表:

-- iOS 12.0 --
    iPhone 6 Plus (AD61D26E-456A-4B4C-9470-B6C362AC140Q) (Shutdown)

选择您想要的 ID(例如 AD61D26E-456A-4B4C-9470-B6C362AC140Q)(您可以根据需要创建自己的设备xcrun simctl create)。

使用该设备启动模拟器(用 ID 替换 YOUR-DEVICE-ID)

/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator -CurrentDeviceUDID <YOUR-DEVICE-ID>

现在您应该可以使用 simctl 来安装和启动命令了。

xcrun simctl install <YOUR-DEVICE-ID> <PATH-TO-APPLICATION-BUNDLE>
xcrun simctl launch <YOUR-DEVICE-ID> <BUNDLE-ID-OF-APP-BUNDLE>

xcrun simctl help更多细节。


推荐阅读