Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entitlements in your app bundle signature do not match the ones that are contained in your provisioning profile

I'm getting a weird issue, I've not changed any expo settings in the expo app.json, and suddenly Apple is rejecting the archive with the following reason:

ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: '[]' for the key 'com.apple.security.application-groups' in 'Payload/ExpoKitApp.app/com.company.appname'.

My expo config is as shown below:

{
  "expo": {
    "name": "App Name",
    "slug": "app-name-slug",
    "version": "1.1.1",
    "orientation": "portrait",
    "icon": "./src/assets/icon.png",
    "splash": {
      "image": "./src/assets/splash.png",
      "resizeMode": "cover",
      "backgroundColor": "#000000"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": false,
      "bundleIdentifier": "com.company.appname",
      "buildNumber": "1.1.1",
      "infoPlist": {
        "NSCameraUsageDescription": "App Name uses your camera to allow you to upload a profile picture.",
        "NSPhotoLibraryUsageDescription": "App Name uses your photos to allow you to upload a profile picture."
      }
    },
    "android": {
      "package": "com.company.appname",
      "versionCode": 13,
      "permissions": []
    },
    "web": {
      "favicon": "./src/assets/favicon.png"
    },
    "androidStatusBar": {
      "barStyle": "light-content",
      "backgroundColor": "#042f3d"
    },
    "androidNavigationBar": {
      "barStyle": "dark-content",
      "backgroundColor": "#042f3d"
    },
    "description": ""
  }
}

Admittedly this is the first issue I've had with the Apple Review system (this is the first app) so I have no idea where to look. Any help would be appreciated.

Edit: I use expo on windows, and I have App Store Connect.

like image 603
Ashley Williams Avatar asked Mar 01 '23 19:03

Ashley Williams


1 Answers

I am open to correction on this answer of course, but as mentioned in a comment above:

Guess at root cause: (Apple App Store is a closed system, we may only guess)

I believe the Apple back-end has changed as of today, and has started applying a stricter rule to entitlement keys that take array values.

I believe the Apple back-end used to accept empty arrays for entitlement keys that took array values but now requires the entitlement key to either not be present at all, or to contain actual values.

Evidence to back this assertion:

  • I have an entitlements file with a key for "in-app-messaging" entitlement with an empty array like so:
        <key>com.apple.developer.in-app-payments</key>
        <array/>
  • This was fine until just yesterday (I successfully submitted a build, and have submitted builds like this for more than a year.

  • Now it is no longer fine, and you have a similar empty array message in your error.

The fix:

Open the .xcworkspace (Xcode project) file and navigate to the signing and entitlements for my project, and remove the offending entitlement key

The key was empty anyway so should not have an effect other than now the entitlements file has exactly the lines I quoted above removed

The App Store submission is successful.

like image 121
Mike Hardy Avatar answered Mar 04 '23 22:03

Mike Hardy