expo.build:ios works eas build --platform ios does not

I have been building successfully with expo build:ios with no issues.
I am trying to move my build process to eas build --platform ios but I am receiving the following error:

[stderr]

[14:53:32] Input is required, but Expo CLI is in non-interactive mode.
[stderr]
Your project must have a `bundleIdentifier` set in the Expo config (app.json or app.config.js).

I ran expo config and it shows a bundle identifier:

There is a new version of expo-cli available (4.13.0).                │
You are currently using expo-cli 4.12.5                               │
Install expo-cli globally using the package manager of your choice;   │
for example: `npm install -g expo-cli` to get the latest version      │

{
  name: 'xxxxx,
  slug: 'xxxx',
  version: '9.0.0',
  orientation: 'portrait',
  icon: './assets/xxx.png',
  assetBundlePatterns: [
    '**/*'
  ],
  description: '',
  sdkVersion: '42.0.0',
  platforms: [
    'ios',
    'android',
    'web'
  ],
  splash: {
    image: './assets/xxx-splash.png',
    resizeMode: 'cover',
    backgroundColor: '#ffffff'
  },
  updates: {
    fallbackToCacheTimeout: 0
  },
  ios: {
    supportsTablet: false,
    bundleIdentifier: 'xxxx'
  },
  web: {
    favicon: './assets/favicon.png',
    config: {
      firebase: {
        apiKey: 'xxxxxxxx',
        measurementId: 'fG-measurement-id'
      }
    }
  },
  packagerOpts: {
    config: 'metro.config.js',
    sourceExts: [
      'expo.ts',
      'expo.tsx',
      'expo.js',
      'expo.jsx',
      'ts',
      'tsx',
      'js',
      'jsx',
      'json',
      'wasm',
      'svg'
    ]
  },
  android: {
    package: 'com.parlay_mobile.vland',
    permissions: [],
    adaptiveIcon: {
      backgroundImage: './assets/vldback.png',
      foregroundImage: './assets/vldfront.png',
      backgroundColor: '#FFFFFF'
    }
  },
  extra: {
    propertyName: 'xxxx',
    apiKey: 'xxxxxxxxxx'
  },
  _internal: {
    isDebug: false,
    projectRoot: '/Users/chrisnorris/bitbucket/parlay_mobile_new',
    dynamicConfigPath: null,
    staticConfigPath: '/Users/chrisnorris/bitbucket/parlay_mobile_new/app.json',
    packageJsonPath: '/Users/chrisnorris/bitbucket/parlay_mobile_new/package.json'
  }
}

I want to use the new build process but I need to resolve this issue. Thanks for any help.

Chris

still having the issue, whats weird is the build identifies the bundleIdentifier but then says it doesnt have a bundleIdentifier:

Project @chrisnorris070/parlay_mobile_vland
Bundle Identifier parlay.mobile.v

prebuild failed:

Prebuilding managed project

- Clearing ios

✔ Cleared ios code

[19:20:59] 📝  iOS Bundle Identifier Learn more: https://expo.fyi/bundle-identifier

[stderr] [19:20:59] Input is required, but Expo CLI is in non-interactive mode.

[stderr] Your project must have a `bundleIdentifier` set in the Expo config (app.json or app.config.js).

[stderr] See https://expo.fyi/bundle-identifier

node exited with non-zero code: 1

Hi @chrisnorris070

That’s weird.

Can you make sure you have the latest versions of expo-cli and eas-cli installed? Then if that doesn’t somehow fix it, try creating a new app with expo init and see if that builds for you with eas build. If so, then maybe compare the app.json, package.json, etc. from your real app with this new app to see if you can see any relevant differences. If you don’t see anything relevant, maybe try making small changes to the new app to make it more like the real app, until the build fails in the same way. One change at a time.

You should be able to test using expo prebuild instead of doing a full eas build.

Note: If you use expo prebuild, it will basically eject your app, which you can undo afterwards. So you probably want to do something like this:

  • Make sure everything is committed
  • Run expo prebuild
  • Check whether it worked or not
  • Run git clean --force and git reset --hard to get back to where you started
  • Make another change and commit it to git
  • Repeat the above until you’ve worked out what was wrong or you have the complete app working in the “new” app.

just did the prebuild and got:
[android.dangerous]: withAndroidDangerousBaseMod: Project file “MainApplication” does not exist in android project for root “/Users/chrisnorris/bitbucket/parlay_mobile_new”

Was that immediately after creating a new app? Or what changes did you make before getting this error?

After upgrading expo cli and eas cli

So, you upgraded expo-cli and eas-cli, created a new app with expo init and then ran expo prebuild and got this error?

No…I updated cli’s and just ran the prebuild. Haven’t gotten to the stage yet of the reinit.

when I run expo prebuild I am now seeing the following:

parlay_mobile_new git:(master) ✗ expo prebuild
✔ The android project is malformed, would you like to clear the project files and reinitialize them? … yes
✔ Cleared android code
✔ Created native projects
✔ Added Metro config
✔ Updated package.json and added index.js entry point for iOS and Android
🧶 Using Yarn to install packages. Pass --npm to use npm instead.
✔ Installed JavaScript dependencies 4091ms
(node:57147) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/chrisnorris/bitbucket/parlay_mobile_new/node_modules/tslib/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)
✔ Config synced
⚠️  Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
└─ Cause: Invalid `Podfile` file: undefined method `post_integrate' for #<Pod::Podfile:0x00007f8d5d062600>
Did you mean?  post_install.

 #  from /Users/chrisnorris/bitbucket/parlay_mobile_new/ios/Podfile:41
 #  -------------------------------------------
 #  
 >    post_integrate do |installer|
 #      begin
 #  -------------------------------------------

Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1
⚠️  Cannot resolve the path to "graphql-tools" package.
⚠️  Cannot resolve the path to "iterall" package.
⚠️  Cannot resolve the path to "subscriptions-transport-ws" package.
⚠️  Cannot resolve the path to "babel-loader" package.
⚠️  Cannot resolve the path to "eslint-config-standard-jsx" package.
(node:57190) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /Users/chrisnorris/bitbucket/parlay_mobile_new/node_modules/tslib/package.json.
Update this package.json to use a subpath pattern like "./*".
(Use `node --trace-deprecation ...` to show where the warning was created)

prebuild failed this time with just this simple app.json:

{
  "expo": {
    "name": "VLD Sports",
    "slug": "parlay_mobile_vland",
    "version": "10.0.0",
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "bundleIdentifier": "com.chrisnorris070.sportsContestV"
    }
  },
  "name": "VLD Sports"
}

it is still asking for bundle identifier.

I just tried it with a newly created app. It did ask for the Android package for some reason, but otherwise worked fine:

asciicast

What happens if you do this? (i.e. eas/expo versions, etc.)

That is just me replacing the old app.json with the one from the new app (changing the bundle and versions), the blank app builds with no issues.

eas version: eas-cli/0.42.4 darwin-x64 node-v16.13.1
expo version: 5.0.3

OK, so I suggest you try comparing all of the app.json, package.json, etc., etc. with the blank app. If that sheds no light on it, try copying your code from the real app to the blank app and see if it works.

ok I will try the comparison first. If neccessary after that I will try copying code.

I also noticed today eas build --platform ios says:

Specifying "ios.bundleIdentifier" in app.config.js or app.json is deprecated for bare workflow projects.
EAS Build depends only on the value in the native code. Please remove the deprecated configuration.

What exactly are they saying?

it shouldnt be bare it should be managed

Prebuild worked!

I went onto my apple account and realized I had specified a bundle identifier specifically under developer apple, and it was different than the one i had in my app.json. I made them match and prebuild didn’t fail.

1 Like

FastLane failure now. Here is the screen shot.

any ideas what would cause this, @wodin ?

i changed the RNCWebView version according to another link i found (its a known issue), and now I am getting an error with entryPoint. I am also rebuilding after adding entryPoint to app.json since the entry point is app.tsx, not index.js