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

# Build and test your app

> Build a private test version of your branded app, install it on your own iPhone with TestFlight and on Android through internal testing, and send yourself the test notification Referly requires before you submit.

Before the stores see your app, try it on your own phone. Referly builds a private test version, puts it in Apple's and Google's test channels, and asks you to send yourself one notification to prove sign-in and push work. Submitting stays locked until that test notification arrives. This is the **Build & test** part of the Publish step.

**Before you start**

* For iPhone: the **Apple** part is done up to step 5 (the app exists in App Store Connect).
* For Android: the package name is saved. Until Google Play is connected, Android test files are kept in Referly for you to download rather than uploaded.
* The licence is active and the app icon is generated.

## Start a test build

![Step 1 of the Build & test part in Referly with the iPhone and Android platform chips and the Build test version button](https://mintcdn.com/pushlapgrowth/qFsunRhIHLiQtJUe/images/help-center/mobile/publish/build-test-version.png?fit=max\&auto=format\&n=qFsunRhIHLiQtJUe\&q=85\&s=993461612f557a662276c5076bd72409)

1. Pick the platforms and select **Build test version**.

A platform that isn't ready yet shows a dashed chip; hover over it to see what's missing. Each build takes about 15 to 40 minutes per platform, and you can leave the page. The list under the button shows each build's status; select **Log** to read the build output.

When a build finishes:

* **iPhone:** the build goes to TestFlight. Apple then processes it, which can take a little while before it appears.
* **Android:** once Google Play is connected, the build goes to **Internal testing** as a draft release.

## Install it on iPhone with TestFlight

![Step 2 of the Build & test part in Referly with the iPhone TestFlight and Android Internal testing cards](https://mintcdn.com/pushlapgrowth/qFsunRhIHLiQtJUe/images/help-center/mobile/publish/install-test-version.png?fit=max\&auto=format\&n=qFsunRhIHLiQtJUe\&q=85\&s=c2b2a229d30c031a6fe7f7b48400d82a)

You add yourself as a tester once. Later test versions reach you on their own.

1. In [App Store Connect](https://appstoreconnect.apple.com/apps), open your app → **TestFlight**.
2. Select **+** next to **Internal Testing**, name the group (for example `Team`), tick **Enable automatic distribution**, and select **Create**.
3. In the group, select **Invite Testers** and pick yourself. Internal testers must be users of your App Store Connect team.
4. If the build isn't in the group yet, add it under the group's **Builds**.
5. On your iPhone, install Apple's **TestFlight** app, open the invitation email, and install your app.

## Install it on Android

1. In [Play Console](https://play.google.com/console), open your app → **Test and release** → **Testing** → **Internal testing**.
2. On the **Testers** tab, create an email list with your Google account's email, save it, and copy the **Join on the web** link.
3. On the **Releases** tab, open the draft release Referly uploaded, select **Next**, then **Save and publish** to roll it out to your testers. Referly leaves it as a draft on purpose, because Google only accepts drafts for an app that has never been published.
4. Open the join link on your Android phone, accept, and install the app from Google Play.

## Send yourself a test push

![Step 3 of the Build & test part in Referly with the notification title and message fields, the Send to my phone button and a lock-screen preview](https://mintcdn.com/pushlapgrowth/qFsunRhIHLiQtJUe/images/help-center/mobile/publish/test-push.png?fit=max\&auto=format\&n=qFsunRhIHLiQtJUe\&q=85\&s=394c085b134dacfe181117db04d058f3)

1. Open the test app and sign in:
   * **Affiliate app:** sign in as an affiliate of your program **with the same email as your Referly login**. If you don't have an affiliate account, sign up through your affiliate portal first. Referly finds your phone through that email.
   * **Client app (agencies):** sign in with your own Referly login.
2. Allow notifications when the app asks.
3. In Referly, change the title and message if you like and select **Send to my phone**.

When the notification lands, the step turns green and **Submit** unlocks.

* **"No phone with this app is signed in as you yet."** You're not signed in to the test app with the right email, or you didn't allow notifications. Check both and send again.
* **"The push could not be delivered."** On iPhone, the push key is wrong or was revoked: create a new one and upload it. See [Create the push notification key](https://www.referly.so/docs/help-center/mobile/publish/connect-apple.md#create-the-push-notification-key).

## When a build fails

Select **Log** next to the failed build. The most common causes:

* **"Your Apple team already has 3 distribution certificates."** Revoke one you no longer use in your Apple account, then build again.
* **"Create the App Store Connect app record and verify it first."** Finish step 5 of the Apple part.
* **"Generate the app icon first."** Open **Design → App icon** and generate it.
* **"Upload an APNs key so push notifications work."** Finish step 3 of the Apple part.

Next: [Submit for review and launch](https://www.referly.so/docs/help-center/mobile/publish/submit-and-launch.md).


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