> For the complete documentation index, see [llms.txt](https://help.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.autify.com/nocode-mobile/en/using-autify-nocode-mobile/execution-environments/local-device/setup-procedure-for-recording-and-test-execution-on-a-local-device-ios.md). Agents can also search and read this documentation through its [MCP server](https://help.autify.com/~gitbook/mcp).

# Setup procedure for recording and test execution on a local device (iOS)

## Local device setup guide <a href="#local-device-setup-guide" id="local-device-setup-guide"></a>

### 0. What you will need <a href="#what-you-will-need" id="what-you-will-need"></a>

| Item                                                                                                                         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Mac                                                                                                                          | Used to control tests                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| iPhone                                                                                                                       | Local physical device. Make sure the application can run on this device. (If you use an ad hoc provisioning profile, the device must be registered in your Apple Developer account.)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Connection cable                                                                                                             | Used to connect Mac ↔ iPhone                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| Apple Developer account                                                                                                      | A paid account with the permission to create builds. "Access to Certificates, Identifiers & Profiles" is also required. If you do not have this permission, please ask your administrator to grant it. [If you do not have the necessary permissions, you may not be able to start the recording](https://help.autify.com/nocode-mobile/en/troubleshooting/trobleshooting-local-device/how-to-resolve-the-profile-not-found-message.md) . Please refer to [this article](https://help.autify.com/nocode-mobile/en/troubleshooting/trobleshooting-local-device/what-apple-account-settings-are-needed-to-use-local-ios-real-devices.md) regarding your Apple Account as well. |
| Autify NoCode Mobile account                                                                                                 | Used to access Autify NoCode Mobile and obtain a token for the Autify CLI                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| When using an Ad-hoc build, the UDID of the physical device you plan to use must be registered in the build file in advance. |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

### 1. Install and configure Xcode (\~1 hour)

#### Install Xcode and the iOS SDK

If Xcode is not installed, or is out of date, download the latest version from the [App Store](https://apps.apple.com/jp/app/xcode/id497799835?mt=12/).

The iOS SDK must also be installed.\
Open **Xcode ▸ Settings ▸ Components** to confirm that the SDK is present.

![](https://1041389054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj0BSsfTevAGpY0hwBHT7%2Fuploads%2Fgit-blob-7ca043456328eff0c495f9ab12c4fd6cb8bd8c6e%2FLocal_device_iOS_1.webp?alt=media)

{% hint style="info" %}
Xcode and the iOS SDK are large files, so the initial download can take around one hour.
{% endhint %}

#### Sign in with your Apple ID

Next, sign in with your Apple ID in Xcode.\
Open **Xcode ▸ Settings ▸ Accounts**.

If the **Apple IDs** list is empty, or you are signed in with a free account, add a paid Apple Developer account:

Click **+** in the lower-left corner and sign in with an Apple ID enrolled in the paid Apple Developer Program.

![](https://1041389054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj0BSsfTevAGpY0hwBHT7%2Fuploads%2Fgit-blob-a5f645a1ebf7fcd84d71842314f9d15e08d77234%2FLocal_device_iOS_2.webp?alt=media)

***

### 2. Enable Developer Mode on iPhone (\~15 mins)

Developer Mode must be enabled to run automated tests on an iPhone.

On the iPhone, open **Settings ▸ Privacy & Security**, scroll to the bottom, and tap **Developer Mode** to enable it.

If **Developer Mode** does not appear:

* Connect the iPhone to the Mac via USB and launch Xcode.
* Open **Window ▸ Devices and Simulators**.
* Follow the on-screen instructions until the iPhone shows under **Connected**. This may take a few minutes.
* Quit and relaunch **Settings** on the iPhone.

After that, **Developer Mode** should appear under **Privacy & Security**.\
Enabling Developer Mode requires the device to restart.

***

### 3. Install the Autify CLI (\~15 mins)

Install the software needed to connect the device to Autify NoCode Mobile.

#### Install Homebrew

Autify CLI is installed via [Homebrew](https://brew.sh/).\
If Homebrew is not installed, open Terminal and run the command shown under **Install Homebrew** on the Homebrew website.

#### Configure PATH

After installing Homebrew, add it to your `PATH`: You should see a message similar to the following displayed in your terminal. Please execute the command that is written there (the content displayed will vary depending on your machine).

* For MacOS devices

```bash
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/$USER/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
```

* For Linux devices

```bash
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
```

#### Install the Autify CLI

Run the following command in Terminal:

```bash
brew install autifyhq/tap/autify-cli
```

If you encounter errors during installation, please contact Support.

When the command completes successfully, run the command below to verify that the Autify CLI was downloaded correctly:

```bash
autify help
```

If the installation succeeded, you will see the message **“Autify Command Line Interface (CLI)”** along with the version and available commands.

If you see the error `command not found`, your `PATH` variable may not be set. Check the instructions under `PATH` Settings.

### 4. Generate a Personal Access Token in Autify NoCode Mobile (\~5 mins)

In the NoCode Mobile [user settings page](https://mobile-app.autify.com/settings/token), generate a Personal Access Token and store it in a safe place.

### 5. Prepare the device connection (\~15 mins)

First, register the Personal Access Token you generated in the previous step with the Autify CLI. In Terminal, run:

```bash
autify mobile auth login
```

Next, run the following command, which installs the components required to connect your mobile device to Autify NoCode Mobile and lets you enter the necessary information:

```bash
autify mobile link setup
```

Follow the on-screen prompts to complete setup.

* Enter the Workspace ID
  * You can obtain the Workspace ID as follows:
    * Go to <http://mobile-app.autify.com/> and log in.
    * The URL changes to: <https://mobile-app.autify.com/projects/XXXXXXX?by=test\\_plan>
    * The XXXXXXX part is your Workspace ID.
* Adjust the recorder’s screen quality
  * Generally, selecting **1. High** is recommended. However, if you experience recorder freezing, switching to **2. Low** quality may resolve the issue.
    * Please see [this article](https://help.autify.com/nocode-mobile/en/troubleshooting/trobleshooting-local-device/first-steps-to-try-if-an-error-occurs-before-starting-step-1.md#adjust-the-recorders-screen-quality) if you need.
* Consent to log upload
  * Enter Yes to allow log files related to recording and test runs to be sent to NoCode Mobile, which helps Support resolve issues more smoothly.
* Enter the Apple Developer Team ID
  * Enter the Team ID associated with the Apple ID you used to sign in earlier.
  * See [Apple’s documentation](https://developer.apple.com/jp/help/glossary/team-id/) for how to find your Team ID.
* Signing ID
  * Press Enter to accept the default.
* WebDriverAgent Bundle ID
  * Press Enter to accept the default.
  * (WebDriverAgent is an open-source automation tool by Facebook; nothing unrelated to test automation is installed.)

### 6. Start the connection <a href="#start-the-connection" id="start-the-connection"></a>

Run the following command in Terminal to connect your device to Autify NoCode Mobile:

```bash
autify mobile link start
```

After the command starts, log in to Autify NoCode Mobile on the account that created the access token and open the Create New Scenario screen.

If the connection is successful, select Local Device in the dropdown at the bottom of the modal; your device name will appear.

![](https://1041389054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fj0BSsfTevAGpY0hwBHT7%2Fuploads%2Fgit-blob-b6e5c0526a74007a436a032b10effa3daeb61a36%2FLocal_device_iOS_3\(1\).webp?alt=media)

## Using the local device

### Prerequisites

Before recording or running tests on a local device, make sure the iPhone is connected via USB and unlocked.

If you intend to use the device for an extended period, open **Settings ▸ Display & Brightness** on the iPhone and set **Auto-Lock** to **Never**.

{% hint style="warning" %}
**Tests will fail if the device is locked during execution.** Please ensure the device is unlocked before running the test.
{% endhint %}

### Recording

Follow the steps in [Start the connection](#start-the-connection), select the displayed device, and start recording.

If you encounter errors during preparation, confirm with a developer that the build can be installed on the device. Contact Support if issues persist.

### Test execution

As with cloud devices, you can run tests on a local device either by clicking **Run now** on the scenario details page or by running them from a test plan.

## Troubleshooting

Please see [this](https://help.autify.com/nocode-mobile/en/troubleshooting/trobleshooting-local-device.md) article.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.autify.com/nocode-mobile/en/using-autify-nocode-mobile/execution-environments/local-device/setup-procedure-for-recording-and-test-execution-on-a-local-device-ios.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
