I’m somewhat confused about the difference between Expo Go and a Development Build?
Is the development build a custom app and how do you develop with it? Do I need to prebuild and then install it manually every time?
I’m somewhat confused about the difference between Expo Go and a Development Build?
Is the development build a custom app and how do you develop with it? Do I need to prebuild and then install it manually every time?
Hi @cjroe
A development build is basically a custom version of Expo Go that is built with your dependencies and your Android package or iOS Bundle Identifier. This means that, unlike Expo Go, you can use dependencies that rely on native code that is not part of the Expo SDK. (i.e. stuff that you would previously have to eject in order to use.)
You would need to rebuild it whenever you install a new native dependency (or a new version of a native dependency). Presumably this is not something you do every day normally. Also, in theory you could pre-install a bunch of dependencies and use the development build to develop multiple similar apps, just like you would use Expo Go.
If you are only installing dependencies from the Expo SDK then you can stick with Expo Go.
It’s basically the same way you would with Expo Go. You run npx expo start
and then press a
or i
to open it in your Android emulator/iOS Simulator, or you can install it on a device and load your app in it like you would do with Expo Go.
No. If you do not have the native android
and ios
directories in your app, then when you build the dev build, the EAS Build server will run npx expo prebuild
for you. So there’s no need for you to run it locally. If you do run it locally it will generate the android
/ios
directories which complicates things. Because now you either have to clean up afterwards, or else you’ll need to add them to .gitignore
and ignore them, or you need to periodically run npx expo prebuild --clean
or you need to abandon the managed workflow and edit the native projects directly when changing your app icon, splash screen, etc., etc.
I suggest you do not run npx expo prebuild
and let the build servers handle it for you. If you do run it (e.g. for debugging a config plugin) then clean up afterwards.
Someone else asked a similar question recently. Maybe that thread will help too.
Great, thanks for clarifying.
So how should I handle cleaning up after running a prebuild? Do I just delete those folders and run the eas build
instead from now on? Or do I need to clean up any config / other files?
Also, what is the difference between expo run:ios
vs eas build --platform ios
and expo start --dev-client
?
The main thing you need to do to clean up is indeed removing the ios
and android
directories. There are a few less important changes that are made when npx expo prebuild
runs which you can clean up if you want to:
npx expo run:ios
generates the native ios
project (by running prebuild in the background) and then builds that locally on your machine using Xcode. This is probably most useful if you are writing your own native code, or maybe if you’re trying to debug a build issue. There’s some info about this in the “prebuild” docs (see the Side Effects link above which is in the “prebuild” docs).eas build -p ios --local
also builds locally on your machine, but it does it in a temporary directory, so it does not clutter your app with the native code etc. See Run builds locally or on your own infrastructure - Expo Documentationeas build -p ios
is like --local
, except it uploads the code to one of the build servers and builds it there. See iOS build process - Expo Documentationnpx expo start
is for running a dev server on your machine which you can connect to with Expo Go or a dev build. It’s no longer necessary to use the --dev-client
option. If you run it without --dev-client
and you have both Expo Go and a dev build installed then it will ask you which you want to open the app in.This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.