> For the complete documentation index, see [llms.txt](https://mercure-technologies.gitbook.io/xprem/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mercure-technologies.gitbook.io/xprem/local-environment/local-testing.md).

# Local testing

{% stepper %}
{% step %}

### Prebuild

Prebuild your application for IOS and/or Android with:

&#x20;`RELEASE_CHANNEL={{WHAT_YOU_WANT}} expo prebuild`
{% endstep %}

{% step %}

### Setup android

```shellscript
cd android
./gradlew clean            # Clean previous builds
./gradlew assembleRelease  # Build the release APK
./gradlew installRelease   # Install the release APK on a connected device or emulator
```

{% endstep %}

{% step %}

### Setup IOS

```shellscript
cd ios
pod cache clean --all
pod install
```

Then:

1. Open the iOS project in Xcode: `open ios/*.xcworkspace`.
2. Go to **Product** → **Scheme** → **Edit Scheme**.
3. Under **Run**, set **Build Configuration** to **Release**.
   {% endstep %}

{% step %}

### Publish an update

Publish an update using&#x20;

```shellscript
EOO_TOKEN=X npx eoas publish --branch {{BRANCH}}
```

{% endstep %}
{% endstepper %}

### Example app

The xprem github project has a debugging "example-app" already configured with `expo-updates` and `expo-observe` and can be used to troubleshoot and debug your server. You can find the application in the folder `apps/example-app`

To use it

{% stepper %}
{% step %}

### Create a test application in your dashboard

1. Create an application in the dashboard.
2. Generate its certificates.
3. Move the generated `.txt` certificate to `apps/example-app/certs/certificate-dev.pem`.
   {% endstep %}

{% step %}

#### Update `app.config.ts` <a href="#android-setup" id="android-setup"></a>

In `apps/example-app/app.config.ts`, replace `updates.url` and `updates.requestHeaders.expo-app-id` with your values.
{% endstep %}

{% step %}

#### Update `app.json` <a href="#android-setup" id="android-setup"></a>

If you want to test expo-observe metrics replace expo.extra.eas.observe.endpointUrl with:

```
{{YOUR_BASE_URL}}/observe/{{APP_ID}}
```

{% endstep %}

{% step %}

### Build the example app

Follow [this steps](#prebuild)
{% endstep %}

{% step %}

### Test OTA Updates

```shellscript
EOO_TOKEN=X npx eoas publish --branch {{BRANCH}}
```

{% endstep %}
{% endstepper %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mercure-technologies.gitbook.io/xprem/local-environment/local-testing.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
