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 ?
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.
make sure in app.json
{
"expo": {
"name": "your app name",
"description": "your app desc",
....,
"ios": {
"supportsTablet": true
},
"android": {
"package": "com.yourcompany.yourappname"
}
}
}
then run exp build:android
or exp ba
after that
run exp build:status
you'll find, something like this, the Apk's is hosted on amazon aws
[exp] Android:
[exp] APK: https://HOST/yourapp.apk
If you run
exp 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}
{
"expo": {
"name": "your app name",
"description": "your app desc",
....,
"ios": {
"supportsTablet": true
},
"android": {
"package": "com.yourcompany.yourappname"
}
}
}
来源:https://stackoverflow.com/questions/44301539/react-native-generate-apk-and-ipa-using-expo