how to not have expo development build page show when app starts?

895 views Asked by At

Currently using expo and react native. I'm using maestro for E2E testing and everytime the app launches I see the Development Build page comes up first. This is pretty annoying for E2E testing. How can I get rid of that page so that maestro tests will see the first page of the app every time on launch?

enter image description here

1

There are 1 answers

0
monty_lennie On

I had to create a build with developmentClient: false and then prebuild and then build locally and then install the builds in my simulators.

Note: You do not have to build locally but I was reaching my maximum EAS builds so I'm starting to do them locally.

These docs helped me...

https://docs.expo.dev/build/setup/

https://docs.expo.dev/build/eas-json/

https://docs.expo.dev/build-reference/apk/

https://docs.expo.dev/build-reference/simulators/

My updated eas.json

  "cli": {
    "version": ">= 3.16.0"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "development-simulator": {
      "developmentClient": true,
      "distribution": "internal",
      "ios": {
        "simulator": true
      }
    },
    "simulator": {
      "developmentClient": false,
      "distribution": "internal",
      "ios": {
        "simulator": true
      },
      "android": {
        "buildType": "apk"
      }
    },
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    },
    "preview": {
      "distribution": "internal"
    },
    "production": {}
  },
  "submit": {
    "production": {}
  }
}

Steps and commands I used to fix this were

IOS Open simulator Xcode => Open Developer Tool => Simulator

Android Open Virtual Device manager and create simulator

npx expo prebuild --clean Removed android and ios files and creates the files again

eas build -p android --profile simulator --local Locally build android simulator and device apk (no dev tools)

adb devices See what devices are online

adb install build-1690167210800.apk Install app from previous build

eas build -p ios --profile simulator --local Locally build IOS simulator build file (no dev tools) Returns something likeā€¦ You can find the build artifacts in path/to/build/build-1690168440203.tar.gz

  1. Extract the build artifacts: tar -xvzf build-1690168440203.tar.gz
  2. Install the app on the simulator: xcrun simctl install booted abut.app

Test E2E using maestro maestro test maestro