> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobster.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# mobster xcode

> Run your checks after every simulator build in Xcode.

Add a post-action to your Xcode scheme: after each simulator build, Mobster runs the checks of the app you built, on that build, in the background, and the verdict comes as a notification.

## Usage

```text theme={"theme":"css-variables"}
mobster xcode <command>
```

```text theme={"theme":"css-variables"}
examples:
  mobster xcode hook --scheme YourApp
  mobster xcode hook --scheme YourApp --tag smoke
  mobster xcode unhook --scheme YourApp
```

## Commands

| Command | What it does |
| - | - |
| [`mobster xcode hook`](#mobster-xcode-hook) | run your checks after every simulator build in Xcode |
| [`mobster xcode unhook`](#mobster-xcode-unhook) | stop running your checks after Xcode builds |
| [`mobster xcode after-build`](#mobster-xcode-after-build) | run the checks of the app Xcode just built (the post-action runs it) |

## `mobster xcode hook`

Add Mobster's post-action to a shared scheme's build: after each simulator build, the checks of the app Xcode built run in the background on that build, and the verdict comes as a notification.

### Options

| Name | Default | Description |
| - | - | - |
| `--scheme NAME` | the only one, or the one named like the project | the shared scheme |
| `--project PATH` | the one here | the .xcodeproj or .xcworkspace |
| `--sim TYPE[@RUNTIME]` | each check's own | run the checks on this simulator; repeatable |
| `--tag TAG` | none | only the checks with this tag, such as smoke; repeatable |

## `mobster xcode unhook`

Take Mobster's post-action out of the scheme. Nothing else in it changes.

### Options

| Name | Default | Description |
| - | - | - |
| `--scheme NAME` | the only one, or the one named like the project | the shared scheme |
| `--project PATH` | the one here | the .xcodeproj or .xcworkspace |

## `mobster xcode after-build`

Run the checks whose app is the one Xcode just built, on that build. It reads BUILT\_PRODUCTS\_DIR, FULL\_PRODUCT\_NAME, PLATFORM\_NAME and SRCROOT from Xcode. A build for a device is left alone.

### Options

| Name | Default | Description |
| - | - | - |
| `--background` | off | return at once and run in the background, stopping an older build's run |
| `--sim TYPE[@RUNTIME]` | none | a simulator to run on; repeatable |
| `--tag TAG` | none | only the checks with this tag; repeatable |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.