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

# IOS

> Setup in-app purchases for iOS

![In-App Purchases](https://mintcdn.com/shipmobilefast-51a499dc/rNBXOQ08cKXtmr3A/images/header/iap.png?fit=max\&auto=format\&n=rNBXOQ08cKXtmr3A\&q=85\&s=095f24dab20452f645c6dbc1f774b618)

We are using [RevenueCat](https://www.revenuecat.com/) to handle in-app purchases.

* Relevant Links:  [RevenueCat Docs](https://www.revenuecat.com/docs)

> [!WARNING]
>
> First, you need an Apple Developer Account to setup in-app purchases.

## Setup

**Step 1**

Firstly, you need to create a new app in AppStoreConnect.

![Step 1](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step1.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=0a56a9c524e196de5abb70a479fff88f)

**Step 2**

After creating the new app button, you will see the following screen.

![Step 2](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step2.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=c5e47b5003480fdcaf8333d8ae64e33d)

> [!WARNING]
>
> Please click the `Certificate Identifiers & Profiles` link.

**Step 3**

![Step 3](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step3.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=2ef0af29447f5badad3fe1316422498f)

> [!NOTE]
>
> Fill the App Bundle ID with your app's bundle ID. like: `com.shipmobilefast.app` We mentioned this bundle ID in the [Quick Start section](https://docs.shipmobilefast.com/quickstart).
>
> * I mean this is your app's bundle ID.

**Step 4**

After filling the bundle ID, click the `Continue` button and turn back to New App Adding screen.

![Step 4](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step4.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=3e5cc99499e0f3f097b3e3f61ab80a68)

> [!TIP]
>
> Please click the `Create` button.

**Step 5**

After clicking the `Create` button, you will see the following screen.

* Go to the `App Information` tab and scroll down to the `App Specific Shared Secret` section.
* Click the `Manage` button and copy the `App Specific Shared Secret`.

![Step 5](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step5.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=2a133e14c2a8c5f99011c30249127beb)

**Step 6**

After clicking the `Manage` button, please click the `Generate` button.

![Step 6](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step6.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=7a75799c09db2d97065f5407a379c424)

**Step 7**

After clicking the `Generate` button, you will see the following screen.

![Step 7](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step7.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=26386c6e49aa45dfff13e5e143395852)

> [!WARNING]
>
> Please copy the `Shared Secret` value and keep it in a safe place. We will use it in the next step.

**Step 8**

After copying the `Shared Secret` value, go back to the RevenueCat dashboard and paste it in the `App Specific Shared Secret` field.

![Step 8](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step8.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=3ff65f21ae8aa320997ab05c0cef3cad)

> [!TIP]
>
> Please click the `Set` button. But don't close this tab. If you try to `Save Changes`, you will lose the `Shared Secret` value and you will get an error.

**Step 9**

After clicking the `Set` button, you will see the following screen. Now go to the `App Store Connect` dashboard again.

![Step 9](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step9.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=4a0d2b4b17b5f7cef95e423646edfc49)

**Step 10**

After going to the `App Store Connect` dashboard, go to the `Users and Access` section.

1. First copy your Issuer ID and paste it on RevenueCat `Issuer ID` field.
2. Click the `+` button to create a new key and Download it.

![Step 10](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step10.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=c509ebaf8c16aaad82102fc6dfa1b686)

> [!WARNING]
>
> Please click the `In-App Purchase` tab under the `Keys` section.

**Step 11**

After clicking the `+` button, download the .p8 file and save it in a safe place. Then go back to the RevenueCat dashboard.

> [!TIP]
>
> Please define your app name & bundle ID.

> [!TIP]
>
> Please set your App-Specific Shared Secret.

> [!TIP]
>
> Please upload the .p8 file to the `P8 key file from App Store Connect` field.

> [!TIP]
>
> Please paste your `Issuer ID` to the `Issuer ID` field.

> [!TIP]
>
> Please click the `Save Changes` button.

![Step 11](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step11.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=7f3950e73ed97f84249eeecfdab55e5d)

**Step 12**

![Step 12](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step12.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=c1e93d0decc74f12b51825d0ee6dd021)

> [!TIP]
>
> That's it! Now we need to implement the App Store Connect API setup.

**Step 13**

## App Store Connect API Setup

* Go to the `Users and Access` section.
* Click `App Store Connect API` tab under the `Keys` section.
* Click the `+` button to create a new key.

![Step 13](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step13.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=afa25076ab52dfe78f667eba41edf5cd)

**Step 14**

Generate API key for App Store Connect API.
Name can be anything. Like name of your app. (Ship Mobile Fast API Key)

![Step 14](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step14.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=92605fc01ab348f5e98863ea147d974f)

> [!WARNING]
>
> Please click the `Generate` button and download the .p8 file. Please save it in a safe place.

**Step 15**

Turn back to the RevenueCat dashboard and paste the .p8 file to the `P8 key file from App Store Connect` field.

![Step 15](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step16.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=42bdb213e993b343a4a03ded79bd0faa)

> [!TIP]
>
> Please paste your `Issuer ID` to the `Issuer ID` field.

> [!TIP]
>
> Please click the `Save Changes` button.

**Step 16**

Then click the `Reports` link.

![Step 17](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step17.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=fb1d27b1e1a5f30288d2003bc5004a23)

**Step 17**

Please copy the Vendor ID and paste it to the `Vendor ID` field in the RevenueCat dashboard.

![Step 18](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step18.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=236ebf817604a7967354982f2b84cf5b)

**Step 18**

Copy your Public API Key and paste it to the `.env` file.

![Step 19](https://mintcdn.com/shipmobilefast-51a499dc/eqBm0v-I9CQ3GkW-/images/setup/iap/ios/step19.png?fit=max\&auto=format\&n=eqBm0v-I9CQ3GkW-\&q=85\&s=e97554bf35db7941f9e80b9143dfe074)

```
EXPO_PUBLIC_RC_APPLE_KEY=appl_...
EXPO_PUBLIC_RC_GOOGLE_KEY=goog_...
```

**Step 19**

> [!TIP]
>
> That's it! You have successfully completed the setup for iOS.


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