ios - 从终端命令启动 ios ipa
问题描述
我将使用 Ranorex 自动执行我的应用程序测试。为此,我需要在我的 ios 设备上启动 RanorexServiceApp,然后才能启动我的测试脚本。如何从我的 mac 终端启动 RanorexServiceApp?ps.:语法不好见谅。
我尝试使用 airtest、ios-tagent、ideviceinstaller、ios-deploy、libimobiledevice 并失败了。
解决方案
首先确定您要使用的设备:
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
更多细节。
推荐阅读
- java - Scala - 链接两个隐式转换时如何进行模式匹配?
- javascript - 防止复选框输入条件的无限循环
- reactjs - 使用条件 const 反应调用函数并返回
- c# - 如何在类中缓存查询结果,然后根据 C# 方法中传递的参数重用它进行搜索?
- python - 格式化单行 XML 的问题
- javascript - Javascript 将所有 DOM 元素打印/可视化为保持其结构的节点树
- tensorflow - Tensorflow:累积张量的梯度
- android - Android:如何用字符换行?(不是用语言)帮助我
- itfoxtec-identity-saml2 - 如何将用户名/电子邮件提供给身份提供商以预先填写在 IdP 的用户名框中?
- javascript - WordPress REST API Ajax 显示更多帖子按钮