With EAS cli, how can I show the QR code for installing a build for internal distribution?

531 views Asked by At

I'm using expo-dev-client and EAS for building an app for internal distribution. When I run eas build --profile development --platform all, after the build completes on EAS, QR codes show up with which I can install the build.

How can I show this QR code for past builds?

2

There are 2 answers

0
Keith Schacht On

Since no one answered this, I finally broke down and figured it out for my dev workflow. Documenting this to save future souls from that one extra step each day.

The Expo QR codes for encode a URL of this format: itms-services://?action=download-manifest;url=https://api.expo.dev/v2/projects/$PROJECT_ID/builds/$BUILD_ID/manifest.plist

Beneath the QR code that Expo displays it says: "Send and open the URL below to install it on a registered device."

That URL takes the form: https://expo.dev/accounts/explanation-co/projects/lava-dev/builds/$BUILD_ID

If you're in the habit of scanning the QR code to install the internal distribution binary, then it's the first URL that you want.

  • Get your PROJECT_ID by logging into expo.dev, clicking your project on the left, and copying the ID
  • Your BUILD_ID is dynamic and changes each time you create a new build

Here is a bash command that displays the latest QR code to your screen, within a terminal. Replace PROJECT_ID with what you grabbed above:

echo "itms-services://?action=download-manifest;url=https://api.expo.dev/v2/projects/PROJECT_ID/builds/$(npx eas build:list --buildProfile=development --non-interactive --json --limit=1 | jq -r '.[] | select(.status=="FINISHED") | .id')/manifest.plist" | qrencode -t UTF8

You may need to brew install qrencode, it's a simple utility for converting URLs into ascii QR codes

0
tomtom On

you should build with profile preview

eas build --platform all --profile preview