modifying a bundled react native app using expo - react-native

I have created a react native using app and created an apk for that using expo. Now I have to make some modification in that app. So do I need to build that again using build:android? or Is there any method to modify content in bundled app

If you have the over-the-air updates that expo offers enabled (I believe it's enabled by default), then whenever you publish your app (expo publish), the app on your phone will update automatically (you don't need to download the new apk). That also works when the app is on Play Store.
The way this works, is basically the app requests an updated js file from a public url on launch and runs that js instead of the old one. I personally dislike this approach so I disabled OTA updates for my app. In case you do too, then, you either need to manually listen for updates in your app (please refer to the above link) or install the new apk every time you build a new version (this is only useful in development).

Related

React native automatic update from store

Hi guys I need my react native app to update it self automatically (with user consent) when new version is published to the store (both android and ios)
I need the app to download the apk or ipa and complete the update process, not using CODE PUSH or OTA,
is it possible?
The app itself can't do that.
The closest thing you can do is:
Verify app version against the version on the server (if you have a back end).
Present a button to the user which will open the app store off your platform directly at your app's page, using deep linking.
You will have to keep server and deployed app versions in sync.

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.

code push react native not changed library updates on users App

When I changed a library (like 'react-native-image-crop-picker') version on package.json and distribute it with code push in users app the version not changed.
They see older version of that library in app.
what should I do?
Code Push only works with JS code. It doesn't allow to push native binaries. In your case, you have to update app bundles in stores to update your native dependencies.
The CodePush plugin helps get product improvements in front of your end users instantly, by keeping your JavaScript and images synchronized with updates you release to the CodePush server.
Taken from Code Push docs.

Expo uses old code even though new code has been deployed

I have a react-native app that is using Expo.
In the beginning of the project I pushed some code to the default publishing channel that was never intended to be used in production.
Since then I have released dozens of versions to production and mostly all works as expected. (New installs gets the latest JS code)
However, a few users still gets old versions of the code, even though they literally just downloaded the app from App Store / Google Play.
This is extremely frustrating. How can I make sure that fresh downloads of the app will download the correct/latest version och my JS?
Note that this is not related to the app detecting new code that might be available for download. It is the fact that the wrong code is downloaded and used to begin with. Is there any way to remove all JS-code except the very last version that I published? I imagine that would solve my issue
Turns out, expo don’t always do this successfully. You need to rebuild the react native bundle before publishing.https://proandroiddev.com/bundling-react-native-during-android-release-builds-ec52c24e200d
This is what expo gives as a feature known as Over the Air updates (OTA). Whenever a new version is built with expo channel, it automatically updates even in the app store and play store. But there is a way to disable the updates. the expo documentation for disabling:
It is possible to entirely disable OTA JavaScript updates in a standalone app, by setting updates.enabled to false in app.json. This will ignore all code paths that fetch app bundles from Expo's servers. In this case, all updates to your app will need to be routed through the iOS App Store and/or Google Play Store.
This setting is ignored in the Expo client.
And I do recommend you to read the documents of OTA, which is a good feature when you get to know all of it.
The expo link is expo OTA

React native code update

I published my first app to AppStore last night.
I just want to know if there is code change in my app,
Should I have to re-build and upload .ipa file to itunes connect again?
(Currently, I do not use CodePush and I build app with exp)
Thanks.
Expo comes with a built in CodePush equivalent.
Whenever you publish to expo (using exp publish, the XDE etc), expo builds new JS bundles and uploads them to their servers.
Users who downloaded the app from the stores will get those updates - while iOS users will get them as soon as they open the app, Android users will get them in the second time (iOS is does this syncly while Android asyncly).
Note that this does not apply to changes in the app config (app.json), including sdk upgrades or any other configuration changes.
Yes, you will need to rebuild the release version of your app and upload to the App Store as a new version.