Build iOS .ipa and Android .apk expo app locally by using Turtle CLI
Recently, I had to build an expo app. I tried it by using expo.io servers, but my build was in the queue and I didn’t have time to waste.
So I decided to see if it was possible to build an Expo app locally and I’ve found turtle-cli.
What is Turtle CLI:
Expo allows us to build our apps on their servers. They have built a special CLI to realize it and they Open-Sourced it. So anyone can use and contribute to Turtle CLI.
It allows us to:
In this article, we will use it to build on both iOS and Android 🎯
You will need:
First, we need to install Turtle CLI:
yarn global add turtle-cli
Then you can check if Turtle CLI is properly installed:
turtle-cli -V
Foremost, we will need to create certificates, identifiers, and provisioning profiles.
To be able to build our Android App, we will need to create a Keystore. You can do it by running: (Replace the values by yours)
keytool -genkeypair -v -keystore my-upload-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
Example:
nicolas-dmg@MacBook-Pro-de-Nicolas-2 Desktop % keytool -genkeypair -v -keystore my-upload-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: Nicolas Dommanget-Muller
What is the name of your organizational unit?
[Unknown]: Nicolas-dmg.Fr
What is the name of your organization?
[Unknown]: Nicolas-dmg.fr
What is the name of your City or Locality?
[Unknown]: Colmar
What is the name of your State or Province?
[Unknown]: Alsace
What is the two-letter country code for this unit?
[Unknown]: fr
Is CN=Nicolas Dommanget-Muller, OU=Nicolas-dmg.Fr, O=Nicolas-dmg.fr, L=Colmar, ST=Alsace, C=fr correct?
[no]: yes
Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 10,000 days
for: CN=Nicolas Dommanget-Muller, OU=Nicolas-dmg.Fr, O=Nicolas-dmg.fr, L=Colmar, ST=Alsace, C=fr
[Storing my-upload-key.keystore]
If all went well, you should have a new file “.keystore”.
To sign an Apple App, you will need an Apple developer account. There are multiple steps to get our certificate and profile.
As it is not the goal of this article, we will not see these parts but you can look at these resources:
#mobile-app-development #react #javascript #react-native #expo #programming