How to get the .dSYM file from expo EAS build? - react-native

I have successfully built an app using Expo EAS build and now I want to retrieve the .dSYM file generated.
Anyone know if it's possible? I couldn't find anything related to that in the Expo AES build docs.

Add the following to eas.json:
"ios": {
"buildArtifactPaths": "ios/build/*"
}
https://github.com/expo/eas-cli/issues/968#issuecomment-1172794557

Related

Generate ejected expo app through eas build

I created an expo app then i needed to add a printing package and i could not find any that was supported by expo(if there is any please just comment below) so i ejected my app and i added the react-native-thermal-printer package and i want to generate my app apk through eas build.Is there any special configurations i have to set for the non expo supported package or do i generete the apk as normal...I have already set up my eas.json.Also do i include the generated android folder while uploading to eas ?
Any help will be appreciated
I had exactly the same question. I wanted to use the EAS build with a non Expo friendly package. According to the documentation, the eas.json should look a little different on bare project, but it does not offer any example. According to the same documentation, there are no additional steps needed for bare projects, it should work with the same configuration as in managed projects.
You can find the official Expo documentation with this not here: Build configuration process: 2 Create eas.json
PS: I did not find time to test it yet, but it is definitely a starting point. I hope it helps!

Switch from Expo to bare React native

After giving the command expo build:android to generate .apk file for my project. The size of the app was too big (60MB). So, I went through certian websites, Most of them are showing that I need to eject expo and generate an apk in bare react-native-cli. Is there any method to reduce the size of an expo app? or should I go with bare react-native-cli. If it is a yes, can you provide steps to achieve this?
Cross answering from here. In your app.json make the following changes
"expo": {
...
"android": {
"enableDangerousExperimentalLeanBuilds": true
}
}
And you can use
expo build:android -t app-bundle
This will create an Android Application Bundle which is a publishing format.

Can I not use Expo (cloud service) at all using React Native

I have build an app using react native(detached) but the thing is I would want to completely get rid of Expo. The reason is, what if one day EXPO service get shut down or no more supported.
So in this case I would not want the app to be affected.
Currently I need to publish my app thru ExpoKit to see the latest changes, how would I build my android app so it would not have any reference to Expo but still be able to work properly
Currently this is how I understand how the react native and expo works: first u build ur app using react native code and then a bundle.js is generated somewhere on cloud(EXPO) using publish command so the app communicate with that bundle.js.
Note I am not using any feature from Expo so why would I need Expo in this case?
Edited: If I am detaching my app from expo, I mean why would I still need Expo? Can't I just build the app and run the app without expo at all?
You can build your whole application without using expo, just follow the steps from facebook documentation in "Building Projects with Native Code" tab.
or
you can run "npm run eject" in your project root directory folder.
After this, you can build your appliaction using react-native cli commands, like
react-native run-android.
edited :--
For building apk for production, you can follow steps given in facebook documentation as generating signed apk and for released IPA for iOS yo can follow building your app for production for IOS.

React Native: Generate .apk and .ipa using Expo

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 ?
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
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.
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
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
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}
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/.
This command will work
eas build -p android --profile preview
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.

Created an app with create-react-native-app, how to publish it to the Google Play Store?

I have created an app with create-react-native-app, but I am not sure how to publish it to google play store.
Error 1
After reading this doc.
; exp build:android
[exp] Making sure project is set up correctly...
/[exp] Warning: Not using the Expo fork of react-native. See https://docs.expo.io/.
\[exp] Warning: 'react-native' peer depencency missing. Run `npm ls` in /var/www/html/test/testme/osmosis-seek-android to see full warning.
[exp]
[exp] If there is an issue running your project, please run `npm install` in /var/www/html/test/testme/osmosis-seek-android and restart.
[exp] Your project looks good!
[exp] Checking if current build exists...
[exp] No currently active or previous builds for this project.
? Would you like to upload a keystore or have us generate one for you?
If you don't know what this means, let us handle it! :)
false
[exp] Starting build process...
[exp] Publishing...
[exp] Published
[exp] Your URL is
https://exp.host/#kenpeter/osmosis-seek-android
[exp] Building...
[exp] Must specify a java package in order to build this experience for Android. Please specify one in app.json at "expo.android.package"
With projects created using create-react-native-app you have two paths to the Google Play Store.
Use the Expo exp build command
One path is to use the Expo (a project I work on) exp command-line tool to build the APK. The exp command-line tool (and XDE GUI program) can load projects created with CRNA. After getting set up, you can run exp build:android and receive an APK in a few minutes.
The first time you do this, you'll have to add some information to expo.json or app.json (whichever you have) that's required for the APK. Specifically you need to specify the Java package name like this (it's important it's a valid Java package name!):
{
android: {
package: "com.example.myapp"
}
}
These are the docs that talk about building an APK (and IPA for iOS): https://docs.expo.io/versions/latest/guides/building-standalone-apps.html
Eject and build an APK manually
Another path is to use CRNA's eject command, which creates Xcode and Android project files for you. Then you'd create an APK and submit it to the Play Store like any other React Native Android app. One of the downsides of this approach is that after you've ejected from CRNA, you don't get to use CRNA's tools and it won't take care of upgrades for you in the future.
{
"expo": {
"sdkVersion": "26.0.0",
"name": "TongPos",
"description": "your app desc",
"android": {
"package": "com.sohagfaruque.xxxx"
}
}
}
Please edit your app.json like above mentioned. That worked for me.