Skip to content

Xcode 14.3 run in rosetta simulator. Arch in destination gets ignored. #226

@KunzManuel

Description

@KunzManuel

Troubleshooting

  • I've searched discuss.bitrise.io for possible solutions.
  • Which version of the step is effected? 4.7.0
  • Is the issue reproducible with the latest version? YES
  • Does the issue happen sporadically, or every time? EVERY TIME
  • Is the issue reproducible locally by following our local debug guide? YES

Useful information

Issue description

On migrating a project to the M1 setup our team ran into a problem with building our tests with the Xcode Test for iOS step.
Running with Xcode 14.3 and the M1 large we got the error:
could not find module 'Example' for target 'x86_64-apple-ios-simulator'; found: arm64-apple-ios-simulator

This problem seems to come with Xcode 14.3 which no longer runs in rosetta mode. Release notes

But Xcode 14.3 still allows to run a simulator in rosetta mode. To enable this the destination has to be extended by the arch param.
-destination "platform=iOS Simulator,name=iPhone 14,arch=x86_64"

By having a quick look into the code you can see that this arch param is currently ignored. The destination is parsed and the identifier of the simulator is appended to the xcodebuild command.

  • A quick win would be to add an option to bypass this destination parsing and add the plain destination string to the xcodebuild command.
  • Fastlane ran into the same problem and solved it by adding a Run rosetta simulator attribute. Which adds the arch=x86_64 attribute to the end of the destination Fastlane reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions