iOS Builds
Build and submit iOS apps to TestFlight and the App Store using Capgo’s dedicated Mac infrastructure.
What you will learn
Section titled “What you will learn”- You will learn how to upload your app via Capgo Native build
- You will learn how to configure the certificates for Capgo Native Build
Prerequisites
Section titled “Prerequisites”- A Capgo account with an active subscription
- Your app already registered in Capgo (run
npx @capgo/cli@latest app addif not) - A Mac computer with Xcode installed (it’s possible to setup the build on a linux/windows machine, but it’s not yet documented)
- Valid Apple Developer account ($99/year) (You must have admin or owner rights on the Apple Developer account)
- Your app must be able to build successfully via Xcode
- A Capacitor app
- A configured icon for the app. Apps without an icon cannot be uploaded to the App Store.
The first manual build
Section titled “The first manual build”Before we can start thinking about building the app with Capgo, we should first set it up, and do a first TestFlight build by hand. There are some advantages to doing a manual build first:
- You will setup the distribution certificate on your local machine
- You will create the App Store record if you haven’t done it yet
- You will be able to figure out any issues with the build process linked to your app code
Before we can begin, you must have the distribution certificate installed on your local machine. This is quite a bit complex, but I will explain it below.
Setting up the distribution certificate
Section titled “Setting up the distribution certificate”-
Open Xcode
-
Click on
Xcode->Settings...Alternatively, you can use the shortcutCmd + ,
-
Go to
Accounts
-
Find the Apple Account that is added to the Apple Developer Account

-
Find the team that you will use to deploy the app

-
Click on the
Manage Certificates...button
-
Make sure you can see the distribution certificate in the list

-
If you do not, you need to create a new certificate
- Click on the
+button and then onApple Distribution
- The certificate will be created automatically. You can see it in the list. Look at the previous step to confirm that you see it.
- Click on the
Now that you have the distribution certificate installed, you can begin the build process.
Manual build to TestFlight
Section titled “Manual build to TestFlight”-
Open the app in Xcode
Run
npx cap open iosto open the app in Xcode. -
Find and click on the
archivebuttonIn the Xcode toolbar, find and click on the
product->archivebutton.
-
Wait for the build to complete
-
Click on the
Distribute Appbutton
-
Select
TestFlight Internal Onlyas the distribution method and click onDistributebutton
-
Configure the app record
Fill in the following fields:
- Name: The name of your app - visible in the App Store
- SKU - the SKU of your app - this is used to identify your app in the App Store
- The primary language - the primary language of your app
Then, click on the
nextbutton
-
If the creation of the app record fails, try to close the window and try to archive the app again.
-
Wait for the upload to complete
-
If everything went well, you should see the following screen

-
Click on the
Donebutton
You may instinctively think that all is good now and that you will be able to see your app in TestFlight now, but there are a few more things needed to be done before you can see your app in TestFlight:
- You need to add yourself to TestFlight
- You need to promise Apple that your app doesn’t use any non-standard (like a custom algorithm) encryption. If your app does use any non-standard encryption, I suggest reading the Apple documentation on how to handle this.
Let’s start with the first one:
Adding yourself to TestFlight
Section titled “Adding yourself to TestFlight”-
Go to the App Store Connect page

-
Sign in with your Apple Developer account
-
Select the team that you used when you created the app record. If you are only in one developer account, can skip this step.

-
Click on the
Appsbutton
-
Find the app you created in the previous step and click on it

-
Click on the
TestFlightbutton
-
Click on the
Internal Testers plusbutton
-
Create a new group
I like to name the group “internal”. You can name it whatever you want.

-
Click on
Invite testersbutton
-
Add yourself to the group
Find yourself in the list and select the checkbox next to your name. (You may need to refresh the page to see yourself) Then, click on the
Addbutton.
-
Verify that you are added to the group
Now, you should see yourself in the group.

Congratulations 🎉 You have added yourself to TestFlight. Now, there is just one more thing you need to do before you can configure Capgo Native Build.
Setting up the compliance information
Section titled “Setting up the compliance information”You now need to promise Apple that your app doesn’t use any non-standard (like a custom algorithm) encryption. If your app does use any non-standard encryption, I suggest reading the Apple documentation on how to handle this. There are two ways to do this:
- You can do this by hand every time you build your app.
- You can configure your plist file to automatically set this value to
false.
Let’s start with the first one:
-
Follow all the steps from the previous section to find the TestFlight section in App Store Connect
-
Click on
Builds -> iOS
-
Find the build with missing compliance information and click on
Manage
-
Select the option that best describes your app
For me, this is
none, but it might be different for you. After, click save
-
Your app should now say
ready to test
As for the second one, here are the steps:
-
Open the
Info.plistfile -
Add the following key:
<key>ITSAppUsesNonExemptEncryption</key><false/> -
Save the file
Installing the TestFlight app and accepting the invitation
Section titled “Installing the TestFlight app and accepting the invitation”Now, you are ALMOST ready to test your app in TestFlight. Before, you need to do the following things:
- Download the TestFlight app from the App Store on your iOS/iPadOS device
- Accept the invitation to test your app
I will skip the details of how to install the TestFlight app on your device. If you are not sure how to install an app, Google has some great guides on how to do it.
As for accepting the invitation, you will receive an email from Apple with a link to accept the invitation.
-
Open the email from Apple with the link to accept the invitation
-
Click on
View in TestFlightbutton
-
Click on the
Installbutton
-
Install the app on your device
If you have installed the app previously using Xcode, you may see the following screen. Please click on the
installbutton.
-
Wait for the app to install
-
Click on the
Openbutton and click it
Congratulations 🎉 You have accepted the invitation to test your app in TestFlight. Now, you can configure Capgo Native Build to build and submit your app to TestFlight.
Configuring Capgo Native Build
Section titled “Configuring Capgo Native Build”There are a few things you need to configure in Capgo Native Build to be able to build and submit your app to TestFlight. Here is a list of the things you will pass to the Capgo CLI:
| Parameter | Description |
|---|---|
--platform | The platform to build for (ios) |
--apple-team-id | Your Apple Developer Team ID (found in Apple Developer Portal) |
--apple-key | Path to your App Store Connect API Key file (.p8 file) |
--apple-key-id | The Key ID of your App Store Connect API Key |
--apple-issuer-id | Your App Store Connect Issuer ID |
--certificate | Path to your distribution certificate (.p12 file) |
--provisioning-profile | Path to your provisioning profile (.mobileprovision file) |
--apple-profile-name | The name of your provisioning profile |
Example command:
npx @capgo/cli@latest build credentials save \ --platform ios \ --apple-team-id YOUR_TEAM_ID \ --apple-key '/path/to/AuthKey_XXXXX.p8' \ --apple-key-id YOUR_KEY_ID \ --apple-issuer-id YOUR_ISSUER_ID \ --certificate '/path/to/certificate.p12' \ --provisioning-profile '/path/to/profile.mobileprovision' \ --apple-profile-name your-profile-nameTeam ID
Section titled “Team ID”Let’s start with the team ID. Finding it is quite easy.
-
Go to Apple Developer Account and scroll down
-
Find the
Team ID
Apple key, Apple key ID and Apple issuer ID
Section titled “Apple key, Apple key ID and Apple issuer ID”Now, let’s move on to the Apple key.
-
Select the correct team in the dropdown
- Click on your name in the top right corner
- Click on the team you want to use

-
Click on the
Integrationsbutton
-
Find the
issuerClick on the
copybutton to copy the issuer
-
Click on the plus button

-
Set the name of the key and set the access to
App managerand click on theGeneratebutton
-
Save the key ID

-
Download the key


Congratulations 🎉 You have created the Apple key, Apple key ID and Apple issuer ID.
Certificate
Section titled “Certificate”Now, you are ready to export the certificate. As you remember, one of the first steps of this guide was setting up the distribution certificate.
However, Apple in their infinite wisdom, decided that the way you export the certificate is quite different from the way you create them 🙃 Let’s get into setting it up:
-
Open Keychain Access
- Click
Command + Spaceto open the search bar - Search for
Keychain Access - Click on the
Keychain Accessapp
- Click
-
Select the
logincategory and click on theMy Certificatesbutton
-
Find your certificate in the list
The certificate should be named
Apple Distribution: [Your Name/Company] (your team ID)
-
Right-click on the certificate and select
Export
-
Save the certificate as a
.p12file- Make sure to select a good name for the certificate file
- Make sure the file format is set to
Personal Information Exchange (.p12) - Click on the
Savebutton

-
When asked for the password, you can either:
- Skip the password (recommended for simplicity): Click
OKwithout entering a password - Set a password: If you prefer to protect your certificate with a password, you can set one here. Password-protected
.p12files are fully supported by the Capgo CLI - just provide the password using the--p12-passwordoption when running configuration command.

- Skip the password (recommended for simplicity): Click
-
When asked for the “login keychain password”, give the password you use to login to your Mac
Give the password you use to login to your Mac. Then, click on the
Allowbutton.
Congratulations 🎉 You have exported the certificate.
Provisioning profile
Section titled “Provisioning profile”Now, you are ready to export the provisioning profile. I promise, this is the last thing you will need to get from Apple.
-
Go to Apple Developer Profiles
-
Select the correct team in the dropdown
- Click on your name in the top right corner
- Click on the team you want to use

-
Make sure you are on the correct page It should look like this, if it doesn’t click on
profilesin the sidebar
-
Click on the
+button
-
Select the profile type Select
App Store Connectand click on theContinuebutton
-
Select the app you want to build
Find your app in the dropdown and click on the
Continuebutton
-
Select the correct distribution certificate
Select the certificate you exported in the previous step and click on the
Continuebutton
If you are unsure which certificate to select, come back to Keychain Access and find the certificate you exported. Then look at the expiration date.

-
Name the profile
Give the profile a name and click on the
Generatebutton
-
Download the profile
Click on the
Downloadbutton to download the profile
Congratulations 🎉 You have now got everything you need to configure Capgo Native Build.
Running the configuration command
Section titled “Running the configuration command”You have done it! You have now got everything you need to configure Capgo Native Build.
The command you will need to run is:
npx @capgo/cli@latest build credentials save \ --platform ios \ --apple-team-id UVTJ336J2D \ --apple-key ./capgo-tutorial/AuthKey_66FGQZB566.p8 \ --apple-key-id 66FGQZB566 \ --apple-issuer-id 0cd4db4a-5598-45b8-9d32-75cdf127d005 \ --certificate ./capgo-tutorial/capgo-build-tutorial-certificate.p12 \ --provisioning-profile ./capgo-tutorial/capgo_native_build_tutorial.mobileprovision \ --apple-profile-name capgo_native_build_tutorialIf all went well, you will see the following output:

Running the build
Section titled “Running the build”Now, you are ready to run your first build.
Run the following command to build your app:
npx @capgo/cli@latest build request --platform iosCongratulations 🎉 At this point, you have successfully built your app and it is ready to be submitted to the App Store.
Troubleshooting
Section titled “Troubleshooting”If for whatever reason you are having issues either with Capgo Native Build, configuring the credentials or building the app, please don’t hesitate to reach via our support.