> For the complete documentation index, see [llms.txt](https://sagar-r-kothari.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sagar-r-kothari.gitbook.io/blog/_posts/2020-01-31-fastlane-build-ios-simulator.md).

# 2020-01-31-Fastlane-build-ios-simulator

1. Add Following lane to your `fastlane` file.

```
  lane :buildApp do
    xcbuild({
      workspace: "MYPROJECT.xcworkspace",
      scheme: "MYTARGET",
      sdk: "iphonesimulator",
      destination: "platform=iOS Simulator,name=iPhone 8",
      xcargs: "ONLY_ACTIVE_ARCH=NO"
    })
  end
```

1. Replace `MYPROJECT` with name of the project.
2. Replace `MYTARGET` with name of the Target.
3. Run command `bundle exec fastlane ios buildApp`
4. Add this to any CI-CD system like Semaphore, Github Actions.
