# iOS USB

> Kalipso Studio 6.1 documentation · https://doc.sysdevmobile.com/kalipso/6.1/documentation/test/ios-usb
>
> How to test a project on an iOS device over USB: developer mode, Apple .p8 key, GitHub token, installing KClient and troubleshooting.

## Requirements

* Apple Developer account (paid)
* GitHub account
* iOS device running iOS 17 or later

## Enable Developer Mode on iOS

On your iOS device, go to **Settings → Privacy & Security → Developer Mode** and turn it on. The device will restart.

## Connect the Device

Plug your iOS device into your PC with a USB cable. On the device, tap **Trust This Computer** when prompted.

In **Kalipso > Test**, a new iOS icon appears with your device name. Before you can test, you need:

* An **Apple certificate (.p8)**
* A **GitHub personal access token**

The next sections walk through both.

## Apple Certificate

In this section you'll get three things from Apple: the **.p8 certificate**, the **Key ID**, and the **Issuer ID**.

Go to [App Store Connect → Users and Access → Integrations](https://appstoreconnect.apple.com/access/integrations/api)\
or\
sign in at [developer.apple.com/account](https://developer.apple.com/account) and navigate to:\
**App Store Connect > Users and Access > Integrations**.

### Create the P8 key

1. Click the **+** button to create a new key.
2. Give it a name and set the role to **App Manager**.
3. Download the certificate (`.p8` file).
4. Copy the **Key ID** and **Issuer ID** shown on the page.

:::warning
You can only download the `.p8` file **once**. Keep it in a safe place.
:::

## GitHub Token

1. Create a new GitHub repository.
2. In your GitHub account, go to **Settings → Developer Settings → Personal access tokens →** [**Fine-grained tokens**](https://github.com/settings/personal-access-tokens).
3. Click **Generate new token**, give it a name and an expiration date.
4. Under **Repository access**, select the repository you just created.
5. Under **Repository permissions**, set:
   * **Metadata** — Read-only
   * **Actions, Administration, Contents, Secrets, Workflows** — Read and write

:::warning
The token is shown only once. Copy it and keep it in a safe place.
:::

## Install KClient and Upload Your Project

You now have everything needed. In Kalipso:

* **Apple API** tab — select the `.p8` certificate and fill in the **Key ID** and **Issuer ID**.
* **GitHub** tab — paste the token and select the repository.

Kalipso will use GitHub to sign `kclient.ipa` with your Apple certificate and install it on your iOS device — no Mac required.

:::info
If signing fails, see [Troubleshooting](https://doc.sysdevmobile.com/kalipso/6.1/documentation/test/ios-usb.md#troubleshooting) below.
:::

## Troubleshooting

### Certificate limit reached

If signing fails, it's usually because your Apple account has reached the maximum number of **iOS Development** certificates allowed. You need to revoke one before you can create a new one.

1. Go to [Certificates, Identifiers & Profiles](https://developer.apple.com/account/resources/certificates/list) (or [developer.apple.com/account](https://developer.apple.com/account) → **Certificates**).
2. Revoke one existing **iOS Development** certificate.
3. Try again from Kalipso.
