49

I'm trying to generate a .ipa and a .apk file for my React Native app using Expo & Create React Native App. I successfully built the app and was able to get it to run on both an iOS & an Android device thanks to the docs: https://docs.expo.io/versions/v16.0.0/guides/building-standalone-apps.html

When the build is over, my console shows something like

Your URL is https://exp.host/@myname/myapp

I then open exp.host/@myname/myapp on my device and the app shows up via the Expo client.

But at point 4 of the docs, it is said that

When it’s done, you’ll see the url of a .apk (Android) or .ipa (iOS) file — this is your app.

I'm a bit confused. No where in the process do I see any ipa or apk file generated anywhere on my pc. Am I missing something ? How do I actually generate the files ?

clems36
  • 922
  • 1
  • 13
  • 26
  • The docs link you have shared in the question isn't valid anymore. I need a bit of guidance to do the same thing for my app. Do you have the updated source for same instructions? – Jordan Nov 07 '20 at 13:08

9 Answers9

47

make sure in app.json

{
  "expo": {
    "name": "your app name",
    "description": "your app desc",
    ....,
    "ios": {
      "supportsTablet": true
    },
    
    "android": {
      "package": "com.yourcompany.yourappname"
    }
  }
}

then run expo build:android or expo ba

after that

run expo build:status you'll find, something like this, the Apk's is hosted on amazon aws

[exp] Android:
[exp] APK: https://HOST/yourapp.apk
Farhad Bagherlo
  • 6,725
  • 3
  • 25
  • 47
Ansyori
  • 2,807
  • 3
  • 29
  • 37
  • Do I always need to manually type to copy the url for downloading apk? I am getting the url even able to download apk file but the only question is to is there any way to access directly? I dont want to type everytime. – Bilal Hussain Nov 26 '17 at 09:51
  • 1
    @BilalHussain yes you have to copy the url manually to get the APK – Ansyori Feb 07 '18 at 04:00
  • You can use a url to get all the previous and current builds so you can monitor your builds in an easier way: https://stackoverflow.com/a/49048517/1042409 – c-chavez Mar 01 '18 at 11:18
41

You will need to run expo build:status. When building process is complete you will see link to download apk (Android) or ipa(IOS) file.

Murat Tutumlu
  • 762
  • 6
  • 16
2r83
  • 659
  • 1
  • 11
  • 21
  • 3
    Please ensure you have the `exp` command line tool installed: `npm install -g exp` – sisanared Jun 26 '18 at 11:18
  • 7
    In 2019, it's **expo** not **exp** . The link to the recent docs at this time of writing is [expo-standalone-apps](https://docs.expo.io/versions/latest/distribution/building-standalone-apps/). According to the steps in the answer, you would need to run `expo build:status` rather than `exp build:status` and then after run `expo build:android` or `expo build:ios` depending on what OS you're building for. After running that you would be asked a couple of questions like if you want expo to handle everything, I'd suggest you do. – richard4s Apr 13 '19 at 13:26
  • 1
    No currently active or previous builds for this project. – Iman Marashi Aug 04 '20 at 11:45
  • 1
    expo build:android – Omar bakhsh Jul 04 '21 at 04:01
8
  • use `expo build:android` for android
  • use `expo build:ios` for ios

it will ask to create new account if you don't have an expo account expo build:status to know status of your app & the queued app may take around 30 mins to generate apk file .
you can find it in expo website

how to generate apk/ios file from expo

Romil Jain
  • 305
  • 3
  • 5
6

Update For the Latest Version of expo:
Expo will soon deprecate expo build and has encouraged using eas build, which builds to app bundle by default. To build to apk, modify the eas.json file accordingly as given here in expo docs. You will ofcourse have to install eas separately as it doesn't come bundled with expo-cli.

For apk add eas.json as:

{
  "build": {
    "preview": {
      "android": {
        "buildType": "apk"
      }
    },
    "preview2": {
      "android": {
        "gradleCommand": ":app:assembleRelease"
      }
    },
    "preview3": {
      "developmentClient": true
    },
    "production": {}
  }
}

and then run eas build -p android --profile preview

Someone
  • 350
  • 3
  • 13
3

As per https://docs.expo.dev/classic/building-standalone-apps/: "The Classic Build service (expo build:{android,ios}) is in maintenance mode and has been superseded by EAS Build. SDK 46 will be the last SDK supported by Classic Builds and the Classic Build service will stop running for all SDK versions after January 4, 2023.", the new commands are:

  • eas build --platform android for Android
  • eas build --platform ios for iOS
  • eas build --platform all for both

More information: https://docs.expo.dev/build/setup/.

Daniel Danielecki
  • 8,508
  • 6
  • 68
  • 94
2

If you execute build status:

expo build:status

you will get the status update of the build either for ios or android. It will show one of these possible states:

  • Build in progress...
  • There was an error with this build
  • URL of the ipa or apk file

The URL would be something like:

https://expo.io/builds/{buildId}

where {buildId} is a UUID

When you click on the link, it will show the current status, logs being generated, a "Download" button where you can download the ipa or apk file (which will only be available if the build was successful) and a "Cancel" button to cancel the current build (which will only be available if the build is running).

Alternatively you can view your previous and current builds statuses by following this link:

https://expo.io/{@user}/{app}/builds

Replace {@user} with your expo username (including the @ character) and {app} with your app name. Here you can view specific build statuses like Completed or Failed, view logs of your builds, and download current and previous successful builds.

This URL is also shown when you go to your current build, below the "Build logs" title:

This is a build from {@user}/{app}

c-chavez
  • 7,237
  • 5
  • 35
  • 49
2

This command will work

eas build -p android --profile preview

surendra ediga
  • 103
  • 1
  • 4
0

At first, Run this command -> expo build:android then

login your expo account

Choose the build type you would like: apk:normal apk file apk-bundle: for play store and app store

then generate a keystore file and wait minimum 10 minutes then your get a build link https://expo.dev/accounts/your_account_name/projects/project_name/builds/6ab79fef-72fe-4f50-88e2

goto thik link and download your build.

0

if you're using the new Expo Application Services (EAS) to build your React Native app, you can use the following command to generate an IPA file for IOS:

eas build -p ios --profile preview

And if you are using the Android so you can use :

eas build -p android --profile preview