Reading Time: < 1 minutes
I’m going to show you how to create a development build using EAS in React Native.
This build allows us to run the project with native code directly on our device and even perform debugging tests on the build.
First, we need to generate a development build.
Install expo-dev-client:
npm install expo-dev-client --save
Install EAS following this tutorial: Generate an APK with eas in Expo React Native
Go to the eas.json file and add this configuration inside build:
"build": { "development": { "developmentClient": true, "distribution": "internal", "android": { "buildType": "apk" } },
This indicates that we are adding developmentClient, internal distribution, and in this case, we want to generate an APK for Android and avoid generating an aab that wouldn’t allow installation.
Now we create the native debugging build, in this case for Android:
eas build --profile development --platform android
If we want to generate it for iOS:
eas build --profile development --platform ios
If we want to generate for both iOS and Android:
eas build --profile development --platform all
Once generated, we need to install this APK in the case of Android.
When we open the APK, the debugging client will appear:
And now, to apply our changes to this build, we have to start the server with this command:
expo start --dev-client