在Apple M1上使用FastLane Scan运行iOS Project UT
我们正在使用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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只想添加一个简单的替代方案,任何可能受到限制在其项目依赖性之一的能力上的能力的人。我最近刚刚解决了这个问题,发现我需要指定要使用的Xcode build命令。由于某种原因,Fastlane Build效果很好,但是对于Fastlane扫描,这似乎是与Rosetta一起奔跑的必要条件。
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.
您正在使用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?