How can I run the expo-updates package on a simulator while connected to my self-hosted OTA server?

148 Views Asked by At

I want to create my own OTA server that will feed updates to my client which is using the expo-updates library to facilitate communication. I have created the /manifest endpoint suggested in the expo docs here https://github.com/expo/custom-expo-updates-server. However, I just don't know how to run the expo-updates package on a simulator while connected to my localhost OTA server. Does anyone know how to do this? Expo go is out of the question as I already have far too many native dependencies that are not supported by expo go... Expo go won't even compile. I tried running a dev client on my simulator but of course I get an error saying OTA is not supported while in development. Is there a way to run a dev client that sets the DEV property to false (I see in the expo-updates lib that this is a main driver of the error alerts I am receiving, that code can be seen here https://github.com/expo/expo/blob/main/packages/expo-updates/src/Updates.ts).

Thanks, Carl

1

There are 1 best solutions below

0
On

The solution was to run npx react-native run-ios --configuration Release. The __DEV__ variable which is set to true when running dev clients cannot be set as this prevents expo-updates from requesting the OTA server.