Getting release channel in app

#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
#2

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
#3

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
#4

Great! It’s working.

Thank you :slight_smile:

#7

Congratulation! This is a perfect solution :kissing_closed_eyes::kissing_closed_eyes: