Expo release channels and project folder - react-native

I am using Expo’s managed workflow. My app uses google authentication to sign in. During development I was using the Expo client for android and as per the docs I used 'Expo.Google' to achieve google authentication and it worked as intended.
After developing the app, I built a staging version of my app (standalone app) by typing 'expo build:android -t apk --release-channel staging-v1' in my project directory. After the build was finished, I downloaded and installed the apk on my android phone. Only then I realized that I didn’t change 'Expo.Google' to 'GoogleSignIn' which is required for standalone apps.
I can change that in my project files and then publish it to the staging-v1 channel. I think this would make google authentication work in the standalone app but it would also change my project files and then it won’t work in the Expo client. So, do I need to create and maintain two different project folders which would basically be the same except for the google authentication part? In general, how should I manage the channels and the corresponding project files?

Related

Impossible to update expo project inside Expo Go after switching to EAS Build

I have the need to run a project from Expo Go without being connected to PC. We are developing an app that require GPS and needs to be tested in open field.
Before EAS became the standard to create projects i used
expo build:android
ad this created not only the apk, but uploaded the project to my account and i was able to start it from Expo Go projects section just like the app was installed on phisical device. That worked also fo iOS and was a great testing feature.
After i moved to EAS Build
eas build -p android --profile preview --clear-cache
my project inside Expo Go does not update anymore and its stucked at sdk 44 even if now i'm working (and creating builds) with sdk 46.
I went through the official documentation many times but i don't get how to make the app start from Expo Go (project sction) as i did before. Maybe i'm missing some configuration.
Thank you all for any kind reply.
Have a good day.
EDIT
I found the solution to this problem and now my builds are working and uploading to Expo Go.
Check out this information: https://github.com/expo/fyi/blob/main/eas-build-archive.md
Basically EAS Updates will not bundle anything inside your .gitignore, in my case it needed specific config files. Did a quick test by taking them off the .gitignore and now it's working. Will move to GitHub SECRETS in the future.
Hope that helps.

How does Expo work during and after building a package?

I'm a bit skeptical after doing a build apk on expo with a user account. The case is as follows: I must make two similar applications (A and B) for 2 companies, each one with characteristics specific to each company. When I have done "expo build apk" of the first application (A) in Expo, everything has gone well and I have been able to test the apk on a real device (not emulator). Then I build application B in expo with the same user account and everything ends well too, I have obtained an APK file. The problem I get is that when I opened app A on the real device, it was the interface of app B that started. It seemed that by using the same expo account to build, I had overwritten app B over app A. The only solution I did is to create another expo account to build the second app.
So I have two questions:
Can anyone tell me if my reasoning is correct? Does Expo only support one app per account?
When you upload the application (.APK or .AAB) to Google Play. Will the application still depend on Expo? I thought that Expo only build .apk and now it is independent file.
I really appreciate your comments and responses.

How to fix optimazition error publish in play store

my apk is 1.4MB but error is "This APK results in unused code and resources being sent to users. Your app could be smaller if you used the Android App Bundle. By not optimizing your app for device configurations, your app is larger to download and install on users' devices than it needs to be. Larger apps see lower install success rates and take up storage on users' devices."
how to fix this error
It's only a warning, not an error.
For an app that small I wouldn't worry.
It's not something that's made its way into the Ionic ecosystem yet but I heard that if you open up your project in Android Studio and then do the build through there you can create an app bundle.
I'm not totally sure that its fully tested for Ionic so you might have issues with this, but Android have published a full guide:
https://developer.android.com/guide/app-bundle#get_started
This is what they say:
Download Android Studio 3.2 or higher—it's the easiest way
to add dynamic feature modules and build app bundles.
Add support for Dynamic Delivery
by including a base module, organizing code and resources for configuration
APKs, and, optionally, adding dynamic feature modules.
Build an Android App Bundle using Android Studio.
If you're not using the IDE, you can instead build an app bundle from the
command line.
Test your Android App Bundle by using it to generate APKs that
you deploy to a device.
Enroll into app signing by Google Play.
Otherwise, you can't upload your app bundle to the Play Console.
Publish your app bundle to Google Play.

Clarification on deployment workflow when want react-native apps published on native platform's app store?

Just looking for clarification about how react-native apps are intended to be deployed to a platform's native app store (as opposed to being downloaded 2nd-hand from the Expo app) from a continuous-workflow perspective (as opposed to the mechanics of it).
Looking at the expo docs for standalone apps, it seems like the way a project would be continually (re)published would be to rebuild the app into the target platform and upload to the native platform's app store. Have not used react-native in some time, but I had initially thought that if you wanted to publish the app on a native platform's app store, you needed to eject the app and publish the platform's version of the ejected expo app to the native app store (and from then on, work on the app from the ejected version).
Could anyone with actual experience continually deploying react-native apps to native app stores enlighten me how what the standard workflow is here?
Expo provides a method for generating .ipa (iOS) or .apk (Android) without ejecting. You simply run expo build:ios (or build:android) to generate the standalone bundle which can be uploaded to the Play Store or App Store.
It is also worth noting that Expo provides internal over the air updates meaning you only need to publish your application to the App or Play store once. After the initial install, you can deploy updates through expo publish. Then, as per the documentation:
Expo will check for updates automatically when your app is
launched and will try to fetch the latest published version. If a new
bundle is available, Expo will attempt to download it before launching
the experience.

Publishing expo app to App store/Google Play store

I'm currently developing an app with Expo. I've used Expo's Facebook API for users to sign in and realized that if I want to detach I'd have to use the React Native Facebook SDK. I've heard from many people that you can't publish an expo app to the app store, however, the expo website seems to say otherwise. Should I keep developing in Expo or detach and replace any of the expo imports I have?
You can easily generate a .apk or .ipa file with Expo and then upload it to the corresponding store (I have done this multiple times).
From Expo's docs:
The purpose of this guide is to help you create standalone binaries of your Expo app for iOS and Android which can be submitted to the Apple App Store and Google Play Store.
You can find detailed instructions on how to generate the binary files you need in this link.
What your friends might mean with "You can't publish an Expo app to the app store" is the publish command associated with Expo OTA updates. They even have a section explaining how to publish OTA updates to your standalone app.
A handy mindset when dealing with Expo is to think that "publishing" means using Expo's CLI tools to generate an OTA update, while "building" refers to the act of generating a new binary standalone file.
If you still need help with deploying your app to the app store check Expo's distribution guide.