I ran the command
eas build --profile demo with the following eas.json file
It seems however that I can not access the release channel in my app using
Constants.manifest.releaseChannel (it used to work with
expo build --release-channel demo)
How can I access the relase channel in the app? Should I use
or create environment variables in the eas.json?
When you build with EAS, we actually eject and automate the configuration of the bare app. This means that API’s like
Constants.manifest might behave differently compared to the old
expo build (classic). We are trying to minimize these changes, but sometimes this isn’t always possible.
The docs states that
Updates.releaseChannel works in both managed and bare if you haven’t disabled
expo-updates. Because this also works for bare, this should also work for your project
You mentioned adding this manually through an environment variable. That should work too, but requires more manual steps. If you add this to the
extra part of the manifest, you can retrieve it by using
Hope this helps!
When using my app in the expo go app after
expo publish --release-channel demo-v1.2.5 (initial build was done with the command stated in the first post of this thread), it seems that
default. I created a function that fallbacks to
Constants.manifest.releaseChannel in the aforemenntioned case. It seems that this value exists after a publish. Seems to work fine but not very straightforward… Would be useful to have a coherent way of dealing with release channels between eas and expo.
Thanks for pointing this out! That isn’t the intended behavior;
Updates.releaseChannel is meant to be the source of truth in all cases. We’ve just pushed out a fix for this in email@example.com which should make this field have the correct value in Expo Go.