# Test Flight Build

## Build Project to Xcode

{% tabs %}
{% tab title="Unity" %}
{% hint style="warning" %}
&#x20;You will not be able to interact with Triumph in the Unity Editor. Test your integration once your game is exported to Xcode. We're working to add Unity Editor support soon.
{% endhint %}

1. Make sure in your **Build Settings** that you are targeting your game for mobile release. You may get a warning message about required versions. Click 'ok'.
2. Build the project, which will prompt you to create a new folder where the Xcode project will live. Note: this part installs many of our dependencies, and may take quite a few minutes.
3. Navigate to the folder your project built to, and click on the **.xcframework** file to open your project in Xcode.&#x20;
4. Now, you should be able to build and run your game on your iPhone, and interact with Triumph.&#x20;
   {% endtab %}

{% tab title="Swift" %}
Build your project as you normally would!
{% endtab %}
{% endtabs %}

You should now be able to summon the Triumph UI, play a game, and see your results.

## Test Flight Build

In order to test your integration before going live, we require you to distribute a test flight version of your game to us. We will check that (i) your game runs, (ii) payment processing with Apple Pay is set up, (iii) all tournament modes function as expected, and (iv) RNG has been implemented properly. This build should be the same one you submit to the App Store.

{% hint style="info" %}
Your game will show a development mode label until we approve you to go live. Please do not submit your game to the App Store without going through our approval checklist.
{% endhint %}

## Testing Your Integration

Before submitting to Test Flight, test the following pieces of your integration.

### Log in Flow

Log in with your test credentials You will **not** be able to access Triumph real money outside of your test credentials until your application is approved by Triumph.&#x20;

### Deposit

Navigate to the deposit page, and try depositing 5$. The payment should go through, and your balance should increment.&#x20;

### Tournament

Go to the main tournaments tab, and enter a tournament. When you click play, you should be brought to a matching screen, and when you hit play you should see a countdown. When the countdown finishes, your game should be started. When you lose the game, Triumph should properly resummon and show the appropriate score. Make sure that the Triumph primary and secondary labels are hooked up correctly.&#x20;

### RNG

If your game utilizes any element of randomness, RNG synchronization should be enforced. With the test credentials you're using, the random seed for each game will be the same. Play another tournament, and keep track of any elements of randomness. This should be the same between games. For example, in a brick breaker game, the configuration of bricks should be the exact same every time you play. In production, the random seed will be different for each game -- this is just to test that all is hooked up properly.

### Blitz Mode

Blitz mode will not be properly configured yet. This is OK. Do not worry if you see only scores of 0 in blitz mode.&#x20;

### Profile Updating

Profile updating (accessed via the settings tab) will **NOT** work until your game has been approved by Triumph. Do not worry about this.&#x20;

## Submitting to Test Flight

### Create App Bundle ID

To submit to test flight, first, navigate [here](https://developer.apple.com/account/resources/identifiers/bundleId/add/bundle) to create a **bundleID** for your app. Choose any identifier you'd like, and select the capabilities **App Attest, Apple Pay Payment Processing,** and **Push Notifications.** Click Continue and register.

<figure><img src="/files/28FazE8AlVFEZLTkpF8s" alt=""><figcaption></figcaption></figure>

### Create Application in App Store Connect

Now, navigate to App Store Connect. Click on **My Apps** and click **+**. Give your app a display name, and choose the **bundleID** you just created.

For the SKU, you can choose any identifier string.

<figure><img src="/files/aDio3T7vFsVj4NsHGKwl" alt=""><figcaption></figcaption></figure>

### Archive Application

Now, open Xcode and select the target **Any iOS Device**. Note, if you are on the new M1 architecture, there will be **(arm64)** appended to the name. &#x20;

<figure><img src="/files/FJQ0Zqk6YcoT5WWoMEQd" alt=""><figcaption></figcaption></figure>

Next, make sure that you have chosen a proper version in **Info.plist** for your build. Choose whatever version number you'd like.

<figure><img src="/files/ljGWi5mGJAL8cyRcAaFf" alt=""><figcaption></figcaption></figure>

Finally, make sure the `bundleID` you made in the previous step is the same as the bundleID under **Signing and Capabilities**. This is how the build will be associated with the app you created on App Store Connect.

<figure><img src="/files/egANgpUFCsr4I9JYLbIi" alt=""><figcaption></figcaption></figure>

Now, go to `Product -> Archive` in the menu, and select **Archive**.

<figure><img src="/files/0h0FN8pWyzpaWqDIYiNa" alt=""><figcaption></figcaption></figure>

The archiving process will take a few minutes. When archiving is complete, you will see the following screen.

<figure><img src="/files/MpmmBZOPORSgfmIeDX67" alt=""><figcaption></figcaption></figure>

Click Distribute App, and click **App Store Connect** and **Upload** for the next prompts, and click **Next.**

<div><figure><img src="/files/ecJXKkKRLcblhO3ApiZk" alt=""><figcaption></figcaption></figure> <figure><img src="/files/8FHZzSsAD3r8qrbO4tHd" alt=""><figcaption></figcaption></figure></div>

<div><figure><img src="/files/woz9XwzPrOTsugpU0S6w" alt=""><figcaption></figcaption></figure> <figure><img src="/files/9YPoeleowBhGIVRFKQVH" alt=""><figcaption></figcaption></figure></div>

Finally, click upload!

<figure><img src="/files/Z2Hwb5TkDP1KvP7K8Gvz" alt=""><figcaption></figcaption></figure>

Now, wait about an hour, and then go back to App Store Connect.

### Add Triumph as Internal Tester

Go to App Store Connect, and click on **Users and Access**. Add <integrations@triumpharcade.com> as a test user. Click **Invite.** Make sure you select your app under **Apps** so we have access to your app!

<figure><img src="/files/STfkgxl7q6PtDrP75oAJ" alt=""><figcaption></figcaption></figure>

## Triumph Review

{% hint style="info" %}
Note: the SDK will not work in production if you skip this step and simply release to the App Store, so make sure to do this!&#x20;
{% endhint %}

To review your build, we will check the steps outlined above along with your [compliance checklist](/triumph-sdk/go-live-checklist.md). If we find no issues, we will mark your game as ready to go live.&#x20;

You will hear from us within 1-3 business days with either changes to the integration our confirmation that you can move on to the next steps.&#x20;

### Next Steps

Follow the best practice guidelines on the [App Store Submission](/triumph-sdk/app-store-submission.md) page to sumbit your build to the app store.&#x20;


---

# Agent Instructions: 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:

```
GET https://docs.triumpharcade.com/triumph-sdk/test-flight-build.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
