Can I publish to different sdk version?

Please provide the following:

  1. SDK Version: 39.0.0
  2. Platforms(Android/iOS/web/all):Android and iOS

Hi,

My project was built in sdk 37.0.0. And now I upgrade my expo sdk to 39.0.0.
In expo docs,

  • sdkVersion (standalone apps are built to support only a single SDK version)

It means, ota update apply only same installed sdk environment?
If I changed my app.json “sdkVersion: 39.0.0->37.0.0”, is it possible to ota update?

Hi

Yes, if you publish an SDK 39 project then any standalone apps built with SDK 37 will not see the newly published version. They would have to upgrade the app (e.g. from the App Store or Play Store) to version that was built from your SDK 39 version in order to see the OTA updates that were published from your SDK 39 version.

What I have done in the past is have a branch in Git for the old SDK and then on the master branch I had the upgraded version. If I wanted to publish an OTA update that the old apps would see, i checked out the other branch, made my changes there, and then published.

So you have a couple of options, I think:

  1. Go through your git log to find the commit from just before your upgrade to SDK 39. Make a branch from that point, something like this:
git branch sdk-37 5d4efccc3
git checkout sdk-37

If you’ve made changes on your master branch that you need on the sdk-37 branch then you’ll need to manually redo the changes or else maybe cherry-pick the relevant ones from the master branch.

  1. Otherwise, create a new branch from your current master branch. Then use expo upgrade to downgrade to SDK 37 again. Something like this:
git checkout -b sdk-37 master
expo upgrade 37.0.0

Either way you might need to make changes to the code to account for incompatible differences between SDK 37 and SDK 39.