Entitlements can no longer have empty arrays

🐛 Bug Report

Summary of Issue

Apple now requires entitlement keys to be completed or not included at all.

So sending keys like this:

 <key>com.apple.developer.in-app-payments</key>
 <array/>
 
 <key>com.apple.security.application-groups</key>
 <array/>

Will now cause Apple to reject the app when you attempt to upload it with the following error:

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'.

Environment – output of expo diagnostics & the platform(s) you’re targeting

Target Platform: iOS
IDE: Visual Studio Code
Local Platform: Windows 10

Diagnostics:
Expo CLI 4.0.17 environment info:
System:
OS: Windows 10 10.0.18363
Binaries:
Node: 12.16.2 – C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 – C:\Users\ashle\AppData\Roaming\npm\yarn.CMD
npm: 6.14.4 – C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 4.1.0.0 AI-201.8743.12.41.6953283
npmPackages:
expo: ^40.0.0 => 40.0.0
react: ~16.11.0 => 16.11.0
react-dom: ~16.11.0 => 16.11.0
react-native: https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz => 0.62.2
react-native-web: ~0.11.7 => 0.11.7
Expo Workflow: managed

App.json:

{
  "expo": {
    "name": "App Name",
    "slug": "app-name-slug",
    "version": "1.1.3",
    "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.3",
      "infoPlist": {
        "NSCameraUsageDescription": "appname uses your camera to allow you to upload a profile picture.",
        "NSPhotoLibraryUsageDescription": "appname uses your photos to allow you to upload a profile picture."
      },
      "entitlements": {        
      }
    },
    "android": {
      "package": "com.company.appname",
      "versionCode": 15,
      "permissions": []
    },
    "web": {
      "favicon": "./src/assets/favicon.png"
    },
    "androidStatusBar": {
      "barStyle": "light-content",
      "backgroundColor": "#042f3d"
    },
    "androidNavigationBar": {
      "barStyle": "dark-content",
      "backgroundColor": "#042f3d"
    },
    "description": ""
  }
}

How do we ensure these keys are no longer included in the build archive?

2 thoughts on “Entitlements can no longer have empty arrays