Skip to content

Commit

Permalink
docs: add xcodebuild command tips to iOS-introduction doc. (#3140)
Browse files Browse the repository at this point in the history
Co-authored-by: Asaf Korem <55082339+asafkorem@users.noreply.github.com>
  • Loading branch information
GregoryNative and asafkorem committed Jan 23, 2022
1 parent b352680 commit 13ed261
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/Introduction.iOS.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ For a comprehensive explanation of Detox configuration, see our [dedicated API-r

In the above configuration example, make sure to provide the correct information for your project/app. Under the key `"binaryPath"`, you should provide the path of the .app bundle to use. Normally, this is the path where the `"build”` command would output this bundle. Under the key `"build"`, specify the `xcodebuild` command for your project.

:::tip

If your app uses Cocoapods, pass `-workspace` in your `xcodebuild` command, for example:

```json
"build": "xcodebuild -workspace ios/YourProject.xcworkspace -scheme YourProject -sdk iphonesimulator -derivedDataPath ios/build"
```

:::

:::info

For more information on using the xcodebuild command, visit [Apple Docs](https://developer.apple.com/library/archive/technotes/tn2339/_index.html#//apple_ref/doc/uid/DTS40014588-CH1-HOW_DO_I_BUILD_MY_PROJECTS_FROM_THE_COMMAND_LINE_).

:::

Also, make sure the simulator model specified under the key `device.type` (e.g. `iPhone 12 Pro Max` above) is actually available on your machine (it was installed by Xcode). Check this by typing `applesimutils --list` in Terminal to display all available simulators.

For a complete, working example, refer to the [Detox example project configuration](https://github.com/wix/Detox/blob/master/detox/test/package.json).

0 comments on commit 13ed261

Please sign in to comment.