For any projects started before 2024, it is very likely that it is not Expo based. If that is the case for you, you need to manually handle the certificates and provisioning profiles. Check the legacy projects section for more information.
We use EAS to build and sign the app. You can find the documentation here.
We highly suggest to let EAS generate the credentials for you. Simply run the build script and select auto-submit option or run the submit script. Both will ask you if you want to let EAS generate the credentials for you.
Note: We let EAS automatically increment the version code and build number. If you want to do it manually, you can do it in the
app.json(check the documentation).
If you are using EAS for the first time on an existing app, you can use the credentials in use in Google Play Console or App Store Connect. You will need to upload them manually to EAS in Project settings -> Credentials. Follow the instructions during the upload. The credentials should be found in the password vault of the project.
Note: We let EAS automatically increment the version code and build number. You need to run
eas build:version:set -e prodto set the current version code and build number, matching the one in the store. That way, EAS will increment the version code and build number correctly.
For Android, it will suggest to create a new keystore.
For iOS, it will ask you to login to your Apple Developer account. It will then ask you to select a team and create a new distribution certificate and provisioning profile. If you are building using the Taito United team, do not create a new certificate but reuse the one they suggest. Make sure you have the right permissions to create certificates and provisioning profiles.
If you are working on a project that was started before 2024, you will need to manually handle the certificates and provisioning profiles.
Important: it is impossible to generate iOS certificates and provisioning profiles without a Mac and an Apple Developer account.
Note: you can find this step-by-step guide with screenshots in the Legacy Code Signing Tutorial Screenshots on the repo's Wiki.
-
Go to the certificates section of the Apple Developer portal and click on Create a Certificate.
-
Select Apple Distribution and click Continue.
-
Follow the instructions to create a certificate signing request (CSR) using Keychain Access on your Mac.
Note: You can put your work email as the user email and the name of the client and name of the certificate as the common name (e.g. XX Oy - Distribution Managed).
-
Upload the CSR to the Apple Developer portal and click Continue.
-
Download the certificate and double-click it to install it in your Keychain.
-
Open Keychain Access and find the certificate you just installed. Click on the chevron to expand it. Right-click on the private key and select Export.
-
Save the certificate as a .p12 file and make sure to set a password. You should use the password generator from 1Password to set a strong one. Make sure to save it there as well in case we need it in the future.
-
Go to the provisioning profiles section of the Apple Developer portal and click on Create a Profile.
-
You need an Ad Hoc profile for distributing the app to testers and a Distribution profile for submitting the app to the App Store. Select the appropriate one and click Continue.
-
Select the app ID and click Continue.
-
Select the certificate you just created and click Continue.
-
Name the profile and click Continue.
-
Download the profile and double-click it to install it in Xcode.
-
If you are using AppCenter, you need to update the branches to use the new certificates and provisioning profiles. If you haven't already, you can download the provisioning profile from the Apple Developer portal and the certificate from 1Password. The password should be there as well. Select your branch and click on the tool icon on the right. Then click on Sign and upload the files. Click on Save & build to make sure it works properly.
Note: test branches (
devandtest) should use the Ad Hoc profile and the production branch (e.g.master) should use the Distribution profile.
When you upload your first release to Google Play you will see a notice about "App signing by Google Play" and "Google is protecting your app signing key". This is the default behavior and requires no action on your behalf except to press "Continue".
More information can be found here.