13

I am trying to build version "1.2.0" i have changed every single "buildNumber" and "version" in app.json and expo still builds ios buildNumber: "1.0.0". I am using eas build --profile production --platform ios

{
  "expo": {
    "name": "Redacted",
    "slug": "Redacted",
    "description":"Redacted",
    "version": "1.2.0",
    "orientation": "portrait",
    "icon": "./assets/mark.png",
    "splash": {
      "image": "./assets/TRANSPARENT2.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "buildNumber": "1.2",
      "infoPlist": {
        "NSFaceIDUsageDescription": "This app uses the FaceID feature to login. If faceID fails or if it is not available for any reason, the app will fall back to a standard login system."
      }
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      },
      "permissions": [
        "CAMERA",
        "USE_FINGERPRINT",
        "USE_BIOMETRIC",
        "VIBRATE"
      ],
      "package": "Redacted"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "plugins": [
      [
        "expo-notifications",
        {
          "icon": "./assets/DarkVersion.png",
          "color": "#d2282e",
          "sounds": [
            "./assets/notification.m4r"
          ]
        }
      ]
    ]
  }
}

This is what i get on expo.dev...I cant submit the app because of this.

expo build

And here is the error in the console.

enter image description here

Keaton Benning
  • 471
  • 5
  • 13

4 Answers4

16

Same Experience

I had a similar experience updating the app.json file in my-expo-project. I kept the version string the same 0.9.9 and only changed the build number string from 124 to 125.

Running eas build --profile production --platform iOS resulted in the same console error.

You've already submitted this version of the app.

The build summary on expo.dev showed the old build number was delivered.

Older build number delivered to expo.dev1

Solution

Turns out I had to use the expo prebuild command to resolve this.

➜  my-expo-project git:(v125) $ expo prebuild
✔ Created native projects | /android, /ios already created | gitignore already synced
✔ Updated package.json and added index.js entry point for iOS and Android
 Using npm to install packages.
✔ Cleaned JavaScript dependencies 3698ms
✔ Installed JavaScript dependencies 11150ms
✔ Config synced

Now that the app config is synced to the ./iOS and ./Android folders eas build --profile production --platform iOS now delivers the correct bundle and build number to expo.dev

Correct build number delivered to expo.dev2

L4ivi
  • 211
  • 2
  • 6
4

Turns out eas build --profile production --platform ios does not update the plist file every time you run it (super lame IMO). You manually need to go into the ./ios/<yourApp>/plist file and update the CFBundleVersion and CFBundleShortVersionString keys. This is only a thing after your first run of eas build --profile production --platform ios

Keaton Benning
  • 471
  • 5
  • 13
2

If you do not have any native code or have not updated native code inside the ios or android folder, you can delete the folders and let EAS handle the builds for you. Without those folders, eas build -p ios with or without --local will update the build numbers from the app.json file.

If you want to keep the ios and android folders, you'll have to run npx expo prebuild as @L4ivi suggested or you can update the version going into ios > info.plist file and update the string value of CFBundleShortVersionString for your version number and CFBundleVersion for your build number. Or you can open the .xcworkspace file to open the project in Xcode and update the version and build number there.

Benazir
  • 240
  • 4
  • 6
1

In my case [sdk 47, eas-cli/3.9.2, darwin-x64, node-v19.6.1], with "appVersionSource": "remote" in eas.json file, changing the runtimeVersion: { policy: 'appVersion' } in app.config.ts file was helpful.

More read on runtimeVersion in expo documentation.

Behnam Kamrani
  • 739
  • 7
  • 15