How to create iOS app variants with pre-build

I’m not sure how to create a development version of my expo dev client. Following the app variant documentation and running eas build --profile development --platform ios seems to be only partially working. When the build finishes and I go to the link via QR code, I can see it is trying to install an app with the “development” name but it still has the same bundleIdentifier.

When I try changing the bundleIdentifier in Xcode it is creating an iOS App Store build and not an iOS internal distribution build.

"build": {
"development": {
      "developmentClient": true,
      "channel": "development",
      "env": {
        "APP_VARIANT": "development"
      },
      "ios": {
        "resourceClass": "m1-medium"
      }
    },
}

const IS_DEV = process.env.APP_VARIANT === "development";

bundleIdentifier: IS_DEV
? “com.company.devname”
: “com.company.name”;

In your post, please share:

  • Using the prebuild workflow with EAS build / update etc
  • Your eas-cli version: eas-cli/3.5.1 darwin-arm64 node-v18.12.1
  • I’ve tried following the documentation for installing app variants in the managed apps. It doesn’t make sense to do the bare workflow since prebuild will overwrite any changes I make there.

Also I’m not sure if it related to this…

When I leave the “wrong (prod)” bundleIdentifer it creates the iOS internal distribution build but this message is shown under the prebuild section in the build info

Skipped running "expo prebuild" because the "ios" directory already exists. Learn more about the build process: https://docs.expo.dev/build-reference/ios-builds/

Did you see this part of the app variant docs?

In bare project - iOS

If you run npx expo prebuild it generates the android and ios directories containing the native projects. At this point you have pretty much switched to the bare workflow.

You can regenerate the ios and android directories by running npx expo prebuild --clean, but it will completely remove and regenerate them, so if you made any changes to the native projects, you will lost those changes.