Recommended release-channel flow with detached projects (expokit)

For detached projects, release-channels can be a complicated thing, because if you release a bundle that relies on new native functionality that needs to be updated manually, you’re going to run into crashes. I have one idea of how to approach it (below), but wanted to see if other people had ideas of how to tackle this as well.

The safest solution is to create a new release channel for every native update. So if the native code changes, you create a new release channel, perhaps named after the build number, e.g. beta-release-8, prod-release-8, etc… The downside to this is you have to remember to update the bundle url in the native code. Perhaps a clever script could automate it (detect if build number has been incremented, then publish to new release channel, and update URL).


I create a script that updates the release channel in all the relevant places, using the iOS build number and android version code. The idea is that when these are updated, they will create a new release channel of the format channelName-ios_X-android_Y, so for any native dependency updates that require incrementing the build number or version code, a new release channel is created for that set of builds. In some cases (if the numbers increment together) android and iOS will share a release channel, but if only one is updated, it will have its ‘uniquely configured’ release channel.

This uses the json tool CLI, and is tested on macos. Make backups/commits before messing around with this, but it works for me.

Update expousername, expo-project, and expoproject folder names to match your setup


iOSBuildNumber="$(json -f app.json | json expo.ios.buildNumber)"
androidVersionCode="$(json -f app.json | json"
echo "$channel";

plutil -replace manifestUrl -string "exp://$hostUri" ./ios/expoproject/Supporting/EXShell.plist;
sed -i '' "s/?release-channel=.*\"/?release-channel=$channel\"/" ./android/app/src/main/java/host/exp/exponent/;
json -I -f ./ios/expoproject/Supporting/shell-app-manifest.json -e "this.hostUri = \"$hostUri\"";
json -I -f ./android/app/src/main/assets/shell-app-manifest.json -e "this.hostUri = \"$hostUri\"";

to run: channelName

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