ios - 无法通过命令行在模拟器上安装.app

标签 ios xcode ios-simulator appium-ios simctl

我正在使用 appium 进行 ios 测试自动化。最近,在模拟器上安装 .app 时出现错误。我可以在本地复制它。

命令行执行,失败:

xcrun simctl install DEVICE_ID /full/path/to/app

错误信息:

An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2): Failed to install the requested application An application bundle was not found at the provided path. Provide a valid path to the desired application bundle.

但是!

当我将 .app 拖到模拟器上时,它工作正常。 deviceId 是正确的。我可以通过 xcrun simctl 轻松启动和关闭模拟器。 这是在我们的 CI mac slave 上。在我的 Mac 上本地运行(相同版本)工作正常。

环境:

操作系统版本: 产品名称:Mac OS X 产品版本:10.13.5 构建版本:17F77

Xcode 版本:9.4

命令行工具版本:9.4

xcrun 版本: xcrun 版本 43

simctl 版本: @(#)PROGRAM:simctl PROJECT:CoreSimulator-518.22

被测模拟器: iPhone SE (11.4)

我非常乐意提供任何提示。

最佳答案

感谢您的反馈。很高兴知道,拖放使用相同的 API。 我发现了,问题是什么。路径真的不对。但是,cd 进入路径是可行的,这就是为什么我认为路径不是问题所在。

实际路径是“/Users/Jenkins/...”,但我使用了“/Users/jenkins...”,因为这是由 jenkins 的 pwd 函数返回的。看起来我们的 jenkins slave 配置错误。

因此,cd 可以以某种方式处理不正确的大小写,而 xcrun simctl 则不能。

关于ios - 无法通过命令行在模拟器上安装.app,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51062852/

相关文章:

iphone - 如何在没有 XIB 文件的情况下以编程方式更新 Xcode 中的 UILabel?

ios - UIImageView 图像未显示在 iPad 模拟器上

iphone - 为什么我看到一些代码是在 viewDidUnload 中发布的,而不是在 dealloc 中?

xcode - 如何在 xcode 中使用 -quiet 运行 gdb

ios - iOS 浏览器是否通过浏览器上传包含 EXIF 照片元数据?

Xcode 6.1 对 git 的表现很奇怪

ios - 如何在Xcode 5.1.1中安装iPhone 6和iPhone 6 Plus Simulator?

iphone - iPhone模拟器生成的崩溃日志?

ios - 使用 UIRefreshControl 在 UITableView 中禁用底部反弹

ios - 将 NSAttributedString 转换为 Data 进行存储