Skip to content

Your first build

Do Android first. It needs no Apple account, no certificates repo and no 2FA, so you find out fast whether your toolchain works.

All commands run from the root of your Expo project, where eas.json and app.json live.

Terminal window
npx rn-shipyard doctor --platform android

Fix anything marked ✗. See Requirements. build runs these checks again before it starts and stops with REQUIREMENTS_NOT_MET if something blocks it. --skip-checks bypasses that.

Terminal window
rn-shipyard init --platform android

init generates a release keystore at .shipyard/android/release.keystore with keytool and asks for a password (at least 6 characters). It then writes .shipyard/config.json and generates fastlane/Fastfile. The password is never written to disk.

Already shipped with EAS and want to keep the same upload key? Use the migration flags instead.

Back up the keystore and its password somewhere safe. Losing the upload key means a support request to Google.

Terminal window
export ANDROID_KEYSTORE_PASSWORD='the-password-you-chose'
rn-shipyard build --platform android

What happens, in order:

  1. rn-shipyard decides whether android/ may be regenerated, see What prebuild does to your native folders.
  2. npx expo prebuild --clean generates android/ if needed.
  3. Fastlane runs Gradle and signs the app bundle with your keystore.
  4. The .aab lands in output/ and the run is added to .shipyard/history.json.

When it finishes you have output/<name>-<version>-<versionCode>.aab. The versionCode comes from a counter that never reuses a number, see Version numbers.

iOS needs an Apple Developer account and a private Git repo for Fastlane Match, which stores your certificates and profiles encrypted.

Terminal window
export MATCH_GIT_URL=git@github.com:you/certs.git
export MATCH_PASSWORD='an-encryption-password'
export APPLE_TEAM_ID=ABCDE12345
rn-shipyard init --platform ios

init asks for the bundle identifier, team ID and Match repo URL (the environment variables and your config fill in the defaults). With MATCH_PASSWORD set it runs fastlane match appstore. Without it (and without a Match password in the macOS keychain, which init offers to save in a terminal), init skips that step, says so in its summary, and tells you what to run next.

When init runs fastlane match, it runs on your own terminal, so Git or SSH credentials, your Apple ID password and the 2FA code can be typed there. Its output is not redacted. In CI, or with --non-interactive, nothing prompts and a missing credential fails fast. See CI and scripting.

Terminal window
rn-shipyard build --platform ios

Before the build lane starts, rn-shipyard clones your Match repo itself. In a terminal, Git and SSH can ask for a passphrase or credentials right then, on your terminal, so a wrong credential fails in seconds instead of after prebuild. After that the build runs unattended with redacted output.

You get output/<name>-<version>-<buildNumber>.ipa.

Terminal window
rn-shipyard build --platform all

Platforms build one after the other. If iOS fails, Android still runs, and the exit code is 1.

The default profile is production. Use any profile from your eas.json:

Terminal window
rn-shipyard build --platform android --profile preview

Next: Your first submission.

rn-shipyard is an independent open-source project, not affiliated with or endorsed by Expo. Expo and EAS are trademarks of 650 Industries, Inc.