Question: OTA updates to custom hosting

I’m having struggles to understand the flow/meaning of certain expo commands when it comes to OTA.

So, let me detail my current release process:

  1. I’m hosting my app in my own hosting service (firebase).
# export the app
expo export --public-url https://awesome-app-native.firebaseapp.com/

# and deploy it to firebase
firebase deploy
  1. I build the standalone app IPA locally (first time I did using turtles servers, but now I do locally)
# get the certificates made by expo during the first try
expo fetch:ios:certs

# build it locally
EXPO_IOS_DIST_P12_PASSWORD=23456 turtle build:ios --public-url https://awesome-app-native.firebaseapp.com/ios-index.json --team-id abcdef --dist-p12-path awesome-app_dist.p12 --provisioning-profile-path awesome-app.mobileprovision
  1. Upload the IPA to iOS (testFlight)
# the path for archive.ipa was generated in the previous step.
expo upload:ios --path path/to/archive.ipa

So, in this whole process, my question is: In what moment does the OTA happen?

I never used expo publish as mentioned in the docs, so what am I missing? What’s the difference between build and publish? Can I have OTA updates without using Expo servers?

Thank you.

What’s the difference between build and publish ?

expo build is creating apk/ipa expo publish uploads js to expo servers. By default build is running publish internally unless you use no-publish or public-url flags

So, in this whole process, my question is: In what moment does the OTA happen?

the application will check for updates here https://awesome-app-native.firebaseapp.com/ios-index.json, if manifest will change new bundle will be fetched from that server

if you would use publish command instead of public-url flag behaviour would be the same, but app would check expo server for updates.

Thanks for the answer @wkozyra

So, in other words… doing expo export --public-url <URL> + deploy to firebase is enough for an OTA update. The app (on iOS testFlight) will detect the new version, is that correct?

As far as I understand, OTA updates are enabled by default, but it doesn’t seem to be working…
I already did a new export + deploy to firebase and the assets got updated at ios-index.json. The change was simple, just a new line of text. However, the app at testFlight doesn’t show the new text yet. I already refreshed the app and even uninstall/install it again.

Do I need some custom config to enable OTA?

Okay, I finally found out why OTA where not working in my hosting/servers. It was missing a HTTP header (content-type: application/javascript)

Here’s the issue and PR (update docs) explaining it.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.