Is it enough to set the loadJSInBackgroundExperimental
flag to true in order to get updates pushed automatically? If so, I am not seeing them.
Or do you need to do that as well as call Util.reload()
?
Is it enough to set the loadJSInBackgroundExperimental
flag to true in order to get updates pushed automatically? If so, I am not seeing them.
Or do you need to do that as well as call Util.reload()
?
hi @ericmorgan1, for a standalone apps setting the loadJSInBackgroundExperimental
to true should be sufficient. A couple questions:
publish
in XDE or running exp publish
https://docs.expo.io/versions/latest/guides/publishing.html
One thing to make sure is that the SDK version on your standalone app is compatible with the SDK Version you are publishing. https://docs.expo.io/versions/latest/guides/advanced-release-channels.html#what-version-of-the-app-will-my-users-get
Hi @quinlanj,
Thank you for the reply.
Yes, I am publishing by clicking “Publish” in XDE.
I have a standalone app published in the Apple App Store. None of the published changes appear in the standalone App Store app. However, when I use the Expo mobile app, my changes DO appear there.
I don’t think it is an issue with the SDK version being different. I just used Expo to build a new version yesterday and it was published to the App Store this morning. Then, I tried publishing a small change and it does not appear in the standalone version (but does appear in the Expo mobile app version).
Thank you.
Hey @ericmorgan1
Is your standalone app built with loadJSInBackgroundExperimental
? The default behavior is to fetch the js experience right away. The flag you set enables fetching to happen in the background instead – it is experimental and if this flag is enabled, it could be a bug.
Also, just to make sure – im assuming you have not explicitly set isRemoteJsEnabled
flag in app.json
to false.
https://docs.expo.io/versions/latest/guides/configuration.html#isremotejsenabled
Hi @quinlanj,
Yes, I believe it is built with that flag set to true.
I have it in my app.json
and used exp build:ios
to build the app.
I don’t have isRemoteJsEnabled
in my app.json
file. It says the default is true, but do I need to have it?
The only settings in my ios
node of app.json
are bundleIdentifier
, supportsTablet
, and loadJSInBackgroundExperimental
.
hi @ericmorgan1
Ok, this might be a bug with loadJSInBackgroundExperimental
. Your observation that the updates work in the Expo Client (which isnt standalone so the app is eagerly updated), but not in your standalone suggest this is a problem with the loadJSInBackgroundExperimental
feature.
You dont need to set any additional flags – i just wanted to make sure you didnt disable OTA updates (which setting isRemoteJsEnabled
to false
would do)
To unblock yourself, if you get rid of the loadJSInBackgroundExperimental
flag, it should enable OTA updates by eagerly grabbing the most recent updates. If you’ve got some reproducible steps (or can make a reproducible toy project), please do create a github issue so we can root cause this: Issues · expo/expo · GitHub. Thanks!
Ok, thank you. So just removing the flag will still allow published updates to be sent to the standalone app?
I will attempt to make a project to reproduce this and post it as an issue on github.
Hey @ericmorgan1 - how the loadJSInBackgroundExperimental
flag should work is that the first time the app is launched after an update is published, the app will run the old (cached) version while fetching the new one in the background.
You can verify it’s working as expected by publishing an update, opening the app (and seeing the old version), then swiping closed and re-opening the app. At that point, you should see the newest published version. If that is not working, then it is a bug in the loadJSInBackgroundExperimental
code. However, if that works and you just want the update to be applied immediately after publishing, then removing that flag will give you the behavior you want.
Note that we’ll be deprecating that flag in SDK 26 and giving you a different set of configuration options in app.json to allow a bit more customization (and removing the “experimental” tag). So depending on the behavior you want, it may be best to just wait until then and try out the new options.
Hope that helps!
Hi @esamelson
Thanks for the info.
Yes, the behavior you described is not working for me.
However, given what you and @quinlanj have told me, and that it will be deprecated soon, I think I’ll just try removing the flag. Thank you!
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.