React native Expo Build Number does not Increase

Viewed 2309

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

2 Answers

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

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

Related