# Set up iOS

Source: https://shipth.is/docs/ios

## Introduction

This guide outlines the steps to setup an iOS game on ShipThis.

To create a new iOS game, or to re-apply the iOS setup process for an existing game please run the [wizard command](https://shipth.is/docs/reference/game/wizard) in a directory with a **project.godot** file:

```bash
shipthis game wizard ios
```

[tip]
The wizard will try to complete each of these steps for you. You can also run each step individually with the commands shown.
::::

## 1. Connect ShipThis with Apple

[note]
Your Apple Developer credentials never leave your local computer. We recommend
enabling [two-factor authentication (2FA)](https://support.apple.com/kb/HT204915)
for your Apple ID.

ShipThis makes use of Apple's APIs to manage your signing certificates, API keys,
provisioning profiles, bundleIds and apps within the Apple Developer Portal on
your behalf. To do this, ShipThis generates temporary session cookies which it re-uses between the various
[apple commands](https://shipth.is/docs/reference/apple).

```bash
shipthis apple login
```

## 2. Create an App Store Connect API Key

ShipThis can create an **App Store Connect API key** which is used to submit new versions of your game via Apple's App Store Connect API. This API Key is used by all of the iOS games in your ShipThis account. You can create one with the command [`shipthis apple apiKey create`](https://shipth.is/docs/reference/apple/apiKey#apple-apikey-create).

```bash
shipthis apple apiKey create
```

## 3. Create an iOS Distribution Certificate

ShipThis can create an **iOS Distribution Certificate** which is used to sign your games before they are uploaded to the App Store. This certificate is used by all of the iOS games in your ShipThis account. You can create one with the command [`shipthis apple certificate create`](https://shipth.is/docs/reference/apple/certificate#apple-certificate-create).

```bash
shipthis apple certificate create
```

## 4. Create an App Store App And BundleId

ShipThis will register a new App Store App and BundleId using the App Store Connect API. It will ask you to confirm the name of the App and the BundleId string which is typically in the form of com.mycompany.mygame. Both of these need to be unique within the Apple ecosystem. ShipThis will suggest values for these.

You can read more about the command [here](https://shipth.is/docs/reference/game/ios/app#game-ios-app-create)

```bash
shipthis game ios app create
```

## 5. Synchronize Permissions

ShipThis synchronizes your Apple App **Bundle ID** with the capabilities defined in your Godot iOS export preset. It reads your **export_presets.cfg** (iOS preset) and enables or disables the corresponding capabilities in the Apple Developer Portal.

Supported capabilities include:

- **Access WiFi**
- **Increased Memory Limit**
- **Game Center**
- **Push Notifications** (Production or Development)
- **Entitlements** (e.g. Sign in with Apple, from `entitlements/additional`)

For the full mapping of Godot options to Apple capabilities, see [game ios app sync](https://shipth.is/docs/reference/game/ios/app#game-ios-app-sync).

[tip]
You do not need to have an **export_presets.cfg** file in your game directory. ShipThis will use default values if it does not exist.

```bash
shipthis game ios app sync
```

## 6. Create a Mobile Provisioning profile

A **Provisioning Profile** authorizes your app to run on devices and access Apple services. It is a digitally signed XML file issued by Apple that combines your App ID, developer certificate, entitlements, and device identifiers. It's essential for development and distribution.

**You can view the registered Profiles in the [Apple Developer Portal](https://developer.apple.com/account/resources/profiles/list).**

```bash
shipthis game ios profile create
```

## 7. `shipthis game ship` 🚀

You are now ready to ship your game to Testflight with a single command.

```bash
shipthis game ship
```
