How to fix "Missing Push Notification Entitlement"?

After submitting a new build, I receive this email message from App Store Connect:

Dear Developer,

We identified one or more issues with a recent delivery for your app, “Mogoo - Марафоны и Курсы”. Your delivery was successful, but you may wish to correct the following issues in your next delivery:

Missing Push Notification Entitlement - Your app appears to register with the Apple Push Notification service, but the app signature’s entitlements do not include the “aps-environment” entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the “aps-environment” entitlement. Xcode 8 does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor’s Capabilities pane, or manually add the entitlement to your entitlements file. For more information, see

Building apps is out of my area of expertise, so I’m quite confused. My app indeed uses push notifications and its a key-feature. Here is my app.json, if it is important:

{
  "expo": {
    "name": "xxx",
    "icon": "./assets/images/icon.png",
    "scheme": "xxxx",
    "version": "6.0.0",
    "slug": "xxx",
    "sdkVersion": "32.0.0",
    "facebookScheme": "xxx",
    "facebookAppId": "xxx",
    "facebookDisplayName": "Name",
    "assetBundlePatterns": [
      "**/*"
    ],
    "notification": {
      "icon": "./assets/images/notification.png"
    },
    "splash": {
      "backgroundColor": "#FFFFFF",
      "image": "./assets/images/splash.png",
      "resizeMode": "cover"
    },
    "ios": {
      "bundleIdentifier": "com.example.example",
      "icon": "./assets/images/ios-icon.png"
    },
    "android": {
      "package": "com.example.example",
      "googleServicesFile": "./google-services.json",
      "permissions": [
        "CAMERA",
        "READ_INTERNAL_STORAGE",
        "READ_EXTERNAL_STORAGE",
        "WRITE_EXTERNAL_STORAGE"
      ],
      "versionCode": 3
    }
  }
}

and my package.json:

{
  "name": "xxx",
  "main": "node_modules/expo/AppEntry.js",
  "private": true,
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "eject": "expo eject",
    "test": "node ./node_modules/jest/bin/jest.js --watchAll"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/samples": "2.1.1",
    "@expo/vector-icons": "github:expo/vector-icons",
    "@expo/videoplayer": "^0.4.0",
    "adm-zip": "^0.4.13",
    "axios": "^0.18.0",
    "babel-plugin-transform-class-properties": "^6.24.1",
    "mobx": "^5.9.0",
    "mobx-react": "^5.4.3",
    "native-base": "^2.10.0",
    "plist": "^3.0.1",
    "expo": "^32.0.0",
    "react": "16.5.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
    "react-native-keyboard-aware-scroll-view": "^0.8.0",
    "react-native-lightbox": "^0.8.0",
    "react-native-render-html": "^3.10.0",
    "react-native-status-bar-height": "^2.2.0",
    "react-native-video": "^4.3.1",
    "react-navigation": "^2.18.2",
    "xcode": "^1.1.0"
  },
  "devDependencies": {
    "babel-plugin-transform-decorators-legacy": "^1.3.5",
    "babel-preset-expo": "^5.0.0",
    "babel-preset-mobx": "^2.0.0",
    "jest-expo": "^31.0.0"
  }
}

Hi

Check if your app id in apple developer portal have push notification enabled. If it’s not enabled there, you need to enable it and generate new provisioning profile(revoke old one and add --clear-provisioning-profile to next build:ios )

6 Likes

How do you mean enable it? If you click on it, it becomes orange unless you create push service certificates? I did as you said and removed the provisioning profile. Expo still didn’t generate a push cert. It has generated a push notification service key though, but the push service certs are still missing.

This is the correct behavior. Important thing is to recreate the provisioning profile after enabling(checking box), if you did that, everything should be working now.

Push certificates are deprecated in expo and will be soon deprecated by apple too, push key is recommended way now.

2 Likes

Yes I did this and you are correct, everything is working now. I just find the UI in the developer portal to be a bit awkward. Thanks for the help!

Hi, I have the same problem " Missing Push Notification Entitlement " and reading thru the answers, but I can’t find the checkbox next to my app id to enable the push notification. Am I on the wrong spot?
Here is my screenshot.

https://developer.apple.com/ → Account → “Certifactes, ids & Profiles” → App IDs

1 Like

Oh… Thank you so much!!! It’s sometimes not so easy to find stuff :wink:

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.