How to use OTA in bare workflow react native app

Hi,

With SDK38, it seems like we can use Expo OTAs in our app bootstrapped from ‘react-native init’.
So i have installed react-native-unimodules in my app, and it works fine.

Now, i’m trying to implement expo-updates.

But im facing some issue, and having some confustion following the guildelines :

  1. Expo Host Url

in Files such as Expo.plist and AndroidManifest.xml, i have to fill this information :

"https://exp.host/@my-expo-username/my-app"

But i do not use Expo, i’m from Bare Managed Workflow. Even if i created a user account in Expo, my app isn’t still on Expo, since i’m building it with ./gradlew bundleRelease on Android and npx react-native run-ios --configuration Release on iOS (but mostly it’s manually from XCode)

  1. Once it’s installed, documentation doesn’t help me anymore

Once i’ve finished editing my files for iOS and Android like instructed by the documentation (DOC bare/installing-updates/), the Expo docs just puts me a link to the Expo Update ReadMe which doesn’t help me to understand how i can put in place Expo OTAs

  1. Release Channel for my app boostrapped with react-native cli

https://docs.expo.io/bare/updating-your-app/ talks about using release channel so i can build my app with a specific tag (like: staging-v2.0.0) and increment it for every build that implements new natives module. Fine ! i’d love that !
But it doesn’t explain to me how i can set this tag when building my binaries !

I’d like to have a simple tag to set to build my apps like Scheme for Xcode and Variant for Android

So now i’m stuck because i don’t know what i should add to build my apps, and i still don’t know how to add OTA updates to it

Thanks for your time and help :pray:

Hi,

  1. Expo Host Url:
    This page has a good description of what you will need if you want to host your own OTA updates.

  2. Understanding Expo Updates:
    Again, i would start with the first link, along with the readme.
    There are some important concepts such as the application slug and the release channel, these will govern which updates your users will get. You should know when you want to bump versions of your app as not all changes will be delivered via OTA, some will need a new app binary to be distributed.

  3. Release channels
    Build scripts :slight_smile:
    i.e. something like a few of these,

sed -i 's|EXPO_UPDATE_URL" android:value="[-a-zA-Z0-9@:%._/~#=]*"|EXPO_UPDATE_URL" android:value="'$EXPO_UPDATE_URL'"|' $ANDROID_MANIFEST_FILE
sed -i '' 's/versionName="[0-9.]*"/versionName="'$versionNumber'"/' $ANDROID_MANIFEST_FILE
sed -i '' 's/versionCode="[0-9]*"/versionCode="'$APPCENTER_BUILD_ID'"/' $ANDROID_MANIFEST_FILE 
sed -i '' 's/EXPO_RELEASE_CHANNEL" android:value="[a-zA-Z0-9.]*"/EXPO_RELEASE_CHANNEL" android:value="'$releaseChannel'"/' $ANDROID_MANIFEST_FILE

These are bash scripts that run before a build, in our instance we are using App Centre to build our app. These are the android ones, the iOS is a little differernt but same concept.