Skip to content

Commit

Permalink
docs: add Rosetta Simulator Instructions (#4599)
Browse files Browse the repository at this point in the history
* chore: add detox build docs for running in rosetta

* Update website/versioned_docs/version-20.x/troubleshooting/building-the-app.md

Co-authored-by: Asaf Korem <[email protected]>

* Update building-the-app.md

* Update building-the-app.md

* revert building-the-app.md

* Update docs/troubleshooting/building-the-app.md

---------

Co-authored-by: Asaf Korem <[email protected]>
  • Loading branch information
kagrawal98 and asafkorem authored Dec 9, 2024
1 parent aa40512 commit bf7ea88
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions docs/troubleshooting/building-the-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,33 @@ packagingOptions {
exclude 'META-INF/LICENSE'
}
```

### Running Detox in a Rosetta environment

When working with dependencies that require running your iOS app in a Rosetta simulator, you may encounter issues with the `detox build` command. These issues often relate to SwiftEmitModule or SwiftCompile errors. To resolve this, follow these steps:

1. Modify your build command in the Detox configuration:

```json
"build": "xcodebuild -workspace ios/MyApp.xcworkspace -scheme MyApp -configuration Debug -sdk iphonesimulator -arch x86_64 -derivedDataPath ios/build"
```

2. Run the following command in your terminal to ensure Xcode is properly selected:

```bash
sudo xcode-select --switch /Applications/Xcode.app
```

3. Launch the iOS simulator in Rosetta mode:

```bash
arch -x86_64 /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator
```

After following these steps, the `detox build` command should run without errors in your Rosetta environment.

:::note

This approach configures Detox specifically to build and run with Rosetta without affecting your app's regular builds. To run your app with Rosetta in Xcode, enable Rosetta simulator destinations via Xcode.

:::

0 comments on commit bf7ea88

Please sign in to comment.