Giribabu
Giribabu

Reputation: 21

Run iOS project UT's using fastlane scan on Apple M1

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.

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

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

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.

Upvotes: 2

Views: 1011

Answers (2)

RoLAN210
RoLAN210

Reputation: 68

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"

Upvotes: 2

Grant Kamin
Grant Kamin

Reputation: 1329

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?

Upvotes: 1

Related Questions