I have ejected app published in app store. I downloaded my app from app store in a device. And when I 'expo publish' ,the new update was automatically shown in my device. I am so confused. I wonder that if the local network is doing the updates or is it supposed to work like that? or how we can avoid this behaviour?
Simply Add enabled: false into app.json solved my problem. expo version 43.0.0
"updates": {
"fallbackToCacheTimeout": 0,
"enabled": false
},
The Over-the-air updates (OTA) allows send updates easier and faster without publish a new update in the store. You can read more about OTA updates here Over-the-air updates from Expo are now even easier to use! if you want to send the update to the store, you have to upload the new version and wait until they approve the app.
Previously, release builds of apps with expo-updates would embed the
latest published update of your app in the binary. Now, release builds
of both iOS and Android apps will create and embed a new update from
the JavaScript source on disk at build-time. This new update will not
be published automatically and will exist only in the binary with
which it was bundled.
This means you no longer need to run expo publish before creating a
release build for the first time.
This change makes the build process more flexible and similar to most
typical React Native apps. We hope it will make getting started with
expo-updates even easier and faster.
Related
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).
I am doing the changes in my local machine in react native expo app. but after the build, the changes are reflecting in the app I downloaded from the google play without update the app on google play. I don't why this is happening. is it expo natural behaver or I did something, that I don't remember.
Expo, by default, supports Over the Air (OTA) updates which pushes a new JS bundle to live apps when you publish.
You can disable this by changing your app.json to include:
{
"updates": {
"enabled": false
}
}
For more information on configuring OTA updates see the Expo Documentation
I developed an app with React Native and distributed it with Expo. I published the final version into Google Play and Apple Store.
Some time later I discovered in Expo's docs on Publishing that expo publish allows you to create an OTA ("over the air") update that is built into Expo and updates the app automatically, according to this answer:
The standalone app knows to look for updates at your app's published url.
This I tested and worked very well.
However, now I see that people downloading the app from the stores (that is, either Google Play or Apple Store) apparently get the initial version of the app, not the updated one.
What is the exact workflow for the OTA updates? Do they go and "replace" the existing version in Google Play and Apple Store the first time they open it? Or do they need to open it over again to get the update?
And what exactly triggers the update of the app?
We've been having similar problems. I can see two things which might be causing this in your case:
Check in app.json if updates.fallbackToCacheTimeout is set. If it's set, that's how long expo will try to download the latest update before showing the last downloaded version (which will be the initial version after initial download).
If you have a large update, expo will try downloading the update for 30s before showing the last version of your app.
Check here for more info: https://docs.expo.io/versions/latest/guides/configuring-ota-updates/
OTA updates do not replace the version downloaded from the app store, they are stored first in the device's cache before being run on app start after download. Source https://docs.expo.io/versions/latest/sdk/updates/
Update downloads are automatically triggered on app start, then, depending on the settings it will either wait (as long as updates.fallbackToCacheTimeout allows) before showing the app, or show it immediately.
You can force the app to run the latest update (if you have one waiting) by just force quitting the app, then restarting.
Hope this helps!
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
could somebody explain how the Expo client decides whether to refresh my app or use the current version cached (~already downloaded) in the client?
When I'm pushing out a new version with exp push, the Expo app (on Android) doesn't seem to pick it up, unless I clear all data of the app.
I thought that bumping the expo.version in the app.json would solve this but this doesn't seem to be the case.
Thanks!
UPDATE
Ok, I understand it is supposed to happen automatically, but this doesn't seem so - I tried multiple devices which were not offline - I suppose there must be something obvious I'm missing...
https://docs.expo.io/versions/latest/guides/offline-support.html#load-js-updates-in-the-background
Check that you don't have this option on the app.json file:
"updates": {
"fallbackToCacheTimeout": 0
},
I had this option in there and it prevented the app from waiting for a new version to be downloaded.
(on Android) I succeeded by opening the app in Expo, I would see the cached version, then I force stopped the app intentionally, both the app and the expo client. This removes it from the list of open apps on the phone.
Relaunched the expo client, then tapped my demo app again, and it loaded the new version. Tested a few seconds after publishing.