How to make fastlane build_app include the expo publish for ejected RN app?

We have a detached ExpoKit SDK 31 app that we are now building using XCode for development builds and using fastlane build_app for production builds.

On my first production build, I encountered the Unexpected end of JSON input error for shell-app-manifest.json and did an expo publish on the command line to resolve this error per Xcode Build Fails on ExpoKit Detachment from SDK29.

Then we found that expo publish needs to be run before each production build, or else the user will install the build and get a stale JS bundle loaded. Questions:

(1) How can I get fastlane build_app to include that expo publish step?

(2) Each time I manually run expo publish, it results in changes to shell-app-manifest.json,, and shell-app.bundle, which is not desirable for automated builds. How to avoid this? I read but was not clear on how to change this.

We run the expo publish when building the app in CircleCI and then run fastlane build_app after.
So we do:

  • instal expo
  • expo login
  • expo publish

    steps to prepare fastlane build
  • fastlane build_app

Hope that helps.

Thanks, @hsmar very helpful! What do you do with the changed files like shell-app-manifest.json and Do you commit those or just let them disappear into the void on CircleCI?

Hi @terri, we’ve stopped adding those to the commit as we don’t do expo publish before commiting anymore. So yeah, we just let them disappear into the void on CircleCI.

1 Like