How to switch from an Expo Go (and app store) build to Expo Dev Client (and app store) build for an existing project

I have been developing an Expo Go app for for a while. I finally got it far enough along to release it to the app store and the play store. All of this went okay.

Now I am making changes and am going to add the react-native-track-player. To do that I can no longer test with expo go. So I must use the expo dev client.

All of the documentation (including Keith’s video) is done from the point of starting a new project. I am looking for the steps to switch from expo go to expo dev client to an existing project. Can anyone point me to documentation as to how to do that?

I could follow Keith’s and the documentation’s pattern and create a new project and then pull everything over but I am reluctant to do that (because of problems this caused in the past). I am worried that if I do that, I am going to lose everything I did to release to the app stores.

OR
I could try to switch my existing project from an expo go and an app store build to an expo dev client and app store build. But again, I am not sure if this will destroy everything I did to build for the app stores. AND I don’t know what steps to follow because all of the documentation is done to a clean brand new project.

Help! Thanks in advance for this.

BTW - I am switching from the Expo Audio to react-native-track-player because of support for remote control (Bluetooth).

Hi @rjapenga

I assume you’re already building with eas build?

If so, you just need to npx expo install expo-dev-client, then add the following to the start of your app:

import 'expo-dev-client';

and then build it (using the development profile). e.g.:

eas build -p android --profile development

Then you install the dev client on your phone or simulator/emulator and use that instead of Expo Go.

See the docs for more info:

I am building my releases to the app store/play store with eas build. But most of my new changes I was not releasing to the app stores yet.

I was looking for someone to say how to move from building for expo go to expo-dev-client. I will try this and get back to you.

Thanks

1 Like

Is there a “Stack Overflow” entry or some documentation that can tell me a little more about @wodin solution?

When I updated to Expo 49 I started getting Build Errors on ios and I think what you are writing about here might be relevant for me.

You said put it in “the start of your app” - is at the top of my App.js what you mean by that?

Also if I have installed expo-dev-client and inputted an import - are there any other steps that I should know about?

Right. Insert it on the first line of App.js.

Basically just that and eas build -p ios --profile development. Then install it on a device/simulator and use it instead of Expo Go.

About the build errors, see if the following helps:

That got me to load the app and run the app. It ran fine until I loaded the track player. I also guessed what you meant by “the start of your app.” I put it in App.js at the top. Is that correct?

However, I have a problem with my port of react-native-track-player and I am developing this on my own - don’t have the money to fund lots of debug builds. 29 builds to go. I hope that I can (as the documentation said) not have to rebuild and can just change Javascript code and not have to rebuild. Is that correct?

I am pretty sure these problems are mine:
TypeError: taskProvider() is not a function (it is Object), js engine: hermes
Although I have no idea what that means. I will google it tonight.

Thanks for getting me started.

Yes

You can build on your own machine, too. For iOS you need a Mac, unfortunately, because you need Xcode and Apple only makes that for macOS. For Android you can build on macOS or Linux (and I think it should also work on Windows if you run the build in WSL.) You can build as many times as you like on your own machine for free.

Yes, that’s correct. A development build is basically a custom version of Expo Go, except that it has all of your dependencies (e.g. react-native-track-player) built-in. So as long as you only change JavaScript code, you do not have to create a new dev build.

I don’t know off hand what is causing that error, but basically it’s saying you have an object called taskProvider and you’re trying to “call” it as if it’s a function.

e.g.:

const taskProvider = { a: 1, b: 2 };
taskProvider();