13

As Apple removed x86_64 support for Xcode and introduced sperate simulators for Rosetta, I wondered how I could run my app on a Rosetta simulator via cli.

This is also needed for fastlane. (see Fastlane Issue)

In the release notes of Xcode 14.3 nothing regarding the cli is mentioned. (Release Notes)

kaulex
  • 2,921
  • 3
  • 11
  • 38

2 Answers2

2

According to the Github Issue which I opened for fastlane as well a user pointed out that following command can be used to build for Rosetta Simulator.

xcodebuild -workspace App.xcworkspace -scheme App -destination "platform=iOS Simulator,name=iPhone 13,arch=x86_64" build

Fastlane

There is a new run_rosetta_simulator option on scan now.

kaulex
  • 2,921
  • 3
  • 11
  • 38
  • did you ever get that option to run? If I run `fastlane action scan` to see all available options I see the parameter but when I try to run the action with it, fastlane says "Could not find option 'run_rosetta_simulator' in the list of available options". – palme Aug 17 '23 at 16:33
  • never mind, I think it was a versioning problem. Provided version >= 2.213.0 – palme Aug 17 '23 at 16:41
-2

for Xcode 14.3 + please follow this to Open using Rosetta in Xcode 14.3+

To run an app on a Rosetta simulator, you need to do the followings.

  1. Go to the "Product" menu in the menu bar and select Destination > Destination Architectures > Show Rosetta Destinations. You will see architecture in parenthesis next to the simulator. In this case, it is Rosetta.
  2. You will see a Rosetta architecture in parenthesis next to simulator names.

If you want to run on both architectures, select the "Show Both" option.

  • Go to the "Product" menu in the menu bar and select Destination > Destination Architectures > Show Both.

Reference: https://sarunw.com/posts/open-using-rosetta-in-xcode-14-3/

Salman
  • 191
  • 9