Skip to content

Commit

Permalink
chore: add detox build docs for running in rosetta
Browse files Browse the repository at this point in the history
  • Loading branch information
kagrawal98 committed Oct 6, 2024
1 parent 4537830 commit 5609514
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,27 @@ 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/Contents/Developer
```

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.

0 comments on commit 5609514

Please sign in to comment.