在Apple M1上使用FastLane Scan运行iOS Project UT

发布于 2025-02-11 12:58:25 字数 465 浏览 2 评论 0原文

我们正在使用Gitlab&为iOS项目设置CI/CD。 Mac Mini(M1芯片)上的Fastlane工具。

当创建了新的拉请请求时,管道开始并在命令成功下执行。

  • Fastlane iOS构建

,但它显示“没有这样的模块'Alamofire'”错误。

  • Fastlane iOS测试

在同一构建机器MAC MINI(M1芯片)上进行的其他观察结果:

  • 尝试使用Xcode构建或运行测试时,它显示了相同的错误“没有这样的模块'Alamofire'”(使用Rosetta打开)。
  • 构建&运行测试与Xcode一起工作(使用Rosetta检查打开)。

我们正在寻找构建iOS项目,并在模拟器上运行单元测试以进行新/更新请求。构建工作正常,但运行单元测试在编译过程中失败。

对此的任何帮助将不胜感激。

We are setting up CI/CD for iOS project using Gitlab & fastlane tools on Mac Mini(M1 Chip).

When there is a new pull request created, pipeline starts and it executes below command success.

  • fastlane ios build

But it shows "no such module 'Alamofire'" error for below command.

  • fastlane ios test

Other observations on same build machine Mac Mini(M1 Chip):

  • It shows same errors "no such module 'Alamofire'" when try to build or run tests using Xcode(Uncheck Open using Rosetta).
  • Both build & run tests works fine with Xcode(Check Open using Rosetta).

We are looking for build the iOS project and run unit tests on simulator for new/update pull request. Build works fine but run unit tests fails during compilation.

Any help on this would be greatly appreciated.

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

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

发布评论

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

评论(2

来日方长 2025-02-18 12:58:25

只想添加一个简单的替代方案,任何可能受到限制在其项目依赖性之一的能力上的能力的人。我最近刚刚解决了这个问题,发现我需要指定要使用的Xcode build命令。由于某种原因,Fastlane Build效果很好,但是对于Fastlane扫描,这似乎是与Rosetta一起奔跑的必要条件。

xcodebuild_command: "env NSUnbufferedIO=YES arch -x86_64 xcodebuild"

Just want to add one simple alternative for anybody who may be constrained on their ability to get an update to one of their projects dependencies. I recently just worked through this issue and found that I needed to specify the xcode build command to use. For some reason fastlane build works fine, but for fastlane scan this seems to be required to force running with Rosetta.

xcodebuild_command: "env NSUnbufferedIO=YES arch -x86_64 xcodebuild"
只有影子陪我不离不弃 2025-02-18 12:58:25

您正在使用Cocoapods进口Alamofire吗?

您是否碰巧有任何post_install在podfile中设置build_settings的步骤?

You are using cocoapods to import Alamofire right?

Do you happen to have any post_install steps that are setting build_settings in your podfile?

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