tommyy
1
SDK version: 23.0.0
$exp --version
46.0.5
I’ve built an app using:
exp build:ios --release-channel staging
and
exp publish --release-channel staging
However, the releaseChannel is not in Expo.Constants.manifest
as stated in docs.
I need it to be able to pull out certain configs specifically for each environment. I.e:
import Expo from 'expo';
const { Constants: { manifest } } = Expo;
const releaseChannel = manifest.releaseChannel || 'default';
const config = {
default: {
API_BASE_URL: 'my-dev-url',
[some default configs]
},
staging: {
API_BASE_URL: 'my-stage-url',
[some staging configs]
},
production: {
API_BASE_URL: 'my-production-url',
[some production configs]
}
}[releaseChannel];
1 Like
hey @tommyy thanks so much for reporting this. This is a bug and I’m working on this now. Sorry for the inconvenience!
2 Likes
hi @tommyy - this should be fixed now. You may need to republish to trigger a pull from the server in order to see the changes in the manifest.
1 Like
Congratulation! This is a perfect solution
Hi, just want to confirm why releaseChannel is not in the manifest object in the docs: https://docs.expo.io/versions/latest/workflow/how-expo-works/#expo-manifest
metoo
9
releaseChannel is not in the manifest object in __DEV__
mode, are you seeing this in production?
metoo
11
Are you accessing it like Constants.manifest.releaseChannel
?
yes I am. I know that in production, releaseChannel
will be available. I think it should be part of the manifest object in the Expo docs(https://docs.expo.io/versions/latest/workflow/how-expo-works/#expo-manifest) . I am using flow to handle types in my codebase. I get an error regarding releaseChannel
because the there is no type for it in the expo-constants
flow-typed definitions(https://github.com/flow-typed/flow-typed/blob/master/definitions/npm/expo-constants_v5.x.x/flow_v0.69.0-/expo-constants_v5.x.x.js)
insats
13
I also vote for it being part of the documentation.