65
votes

I have received a warning mail from Apple after submitting the binary build.

    Missing Push Notification Entitlement - Your app appears to include API used 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. 
See "Provisioning and Development" in the Local and Push Notification Programming Guide for more information. 
If your app does not use the Apple Push Notification service, no action is required. 
You may remove the API from future submissions to stop this warning. 
If you use a third-party framework, you may need to contact the developer for information on removing the API.

    After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.

I am not using Push notifications or any third party frameworks like Coredova but I am not sure why I am getting this warning again and again. I have gone through the following links but everywhere it is third party framework issue.

I don't want to enable push notification service as I am not going to use it in my app. Any help would be appreciated to fix this warning. Thanks in advance.

Note : Already several times I have tried deleting and re-creating my profiles and certificates.

Missing Push Notification Entitlement warning

Missing Push Notification Entitlement

IOS Missing Push notification entitlement

9
I just got this warning email too, and like Sten's answer below, I don't have any notifications code at all, and my last several revisions never received this warning. So I'm hoping Sten is right and it's just a bug on Apple's side. The only difference for me was that I recently merged some code on bitbucket and then downloaded it locally, so I thought maybe I lost something in that, but these answers are making me think that's not the case.Cody
@Sasi M: I'm too getting the warning mail from Apple. I have tried everything from creating new provisioning profile and other stuff, but still getting such warning. If in case you are able to solve the issue please update the same.Mahesh
I started having the same issue as of yesterday. My application is not and has never been configured to use push notifications, there is no push notification in my code and I'm not even using third party libraries. I'm filing a bug report with Apple, I suggest you do the same.Danny Bravo
Ditto, I have been getting the same email warning on a new app that does not use Push Notifications.rmp
I just got the same email.. My work has stalled a little on my dev branch so I'm only resubmitting the exact same build that I submitted a month ago. I didn't get this email when submitting it a month ago. I'm using local notifications but I presumed these wouldn't require push notification entitlement. I guess we should perhaps log this as a bug with apple?jimbobuk

9 Answers

70
votes

I am pretty certain that it is a bug in Apples checking system. I uploaded an app yesterday and got this message. This app has been updated at least 30 times without any problems. I didn't add any push notification code in the last version and I don't use any frameworks like PhoneGap or Cordova that could cause this message. It doesn't appear under notifications on the device.

I have searched the app for push notification code without finding anything:

grep -r "registerUserNotificationSettings" .
grep -r "registerForRemoteNotificationTypes" .

I finally tried to upload the previous version that was approved in July (and didn't generate an email). This this time I got the warning email also for this version. So I think that Apple is wrong and I will take my chances and hope it will be approved despite the warning.


EDIT: Found this reply from an Apple staff in Apple Developer Forum:

"That notice is a warning only, not a rejection.

The app validator checks for an implementation of the UIApplicationDelegate method application:didRegisterForRemoteNotificationsWithDeviceToken: in the app. You’ll get the warning you described if your app delegate implements that method and there is no aps-environment entitlement.

It's possible that a third-party library you're using has implemented that method even though your app doesn't do anything with push notifications. In that case you can just ignore the warning. It's there to let developers who do use push notifications know if they might have signed their app incorrectly."


EDIT 2: I now have two different apps that have been approved without any problems despite generating the warning email

19
votes

Here are a few things you might want to double check:

Apple Developer Center

In the section Identifiers > App IDs, Push Notifications should not be enabled if you are not implementing them.

Apple Developer Center: Application Services

You will have to generate a new mobile provisioning each time your enable or disable a service. Make sure Push Notifications is not listed in your app enabled services:

enter image description here

Xcode project target settings

In the Capabilities tab of your application target, Push Notifications should be turned off.

Also, in Background Modes, there should not be any Remote Notifications mode.

enter image description here

Application Delegate

Finally, make sure you're not having your application delegate registering for remote notifications and that it is not implementing any remote notification delegate methods. You should make sure the following methods are not called or implemented:

  • registerForRemoteNotifications() (registerForRemoteNotificationTypes() prior to iOS 8.0)
  • unregisterForRemoteNotifications()
  • isRegisteredForRemoteNotifications()
  • application(_:didRegisterForRemoteNotificationsWithDeviceToken:)
  • application(_:didFailToRegisterForRemoteNotificationsWithError:)
  • application(_:didReceiveRemoteNotification:fetchCompletionHandler:)
  • application(_:handleActionWithIdentifier:forRemoteNotification:completionHandler:)
  • application(_:didReceiveRemoteNotification:)

Hope that helps!

2
votes

I am receiving the same email but it seems to only be a warning and my apps managed to get approved to the store.

I have an app that I have been updating in the past 2 years, it does not have push notifications and it's been all good so far until my recent release when I got this warning. After contacting Apple it seems this is just a warning and should not be considered. I think it's an error on their side so hopefully they will get it fixed in the next Xcode update.

2
votes

Go to Target > Capabilities,

Push notification should be enabled without any issues and Background mode also should be enabled.

1
votes

For me too looks like a bug from Apple. The latest version of my app got the warning as well, yet was approved within a week. In this new version I am using an extremely simple Today widget. Thus, I have to link the NotificationCenter framework. The widget reports some data from the containing app. To do so, it simply uses the NSUserDefaults which are shared via the App Groups entitlement. Nothing remotely as sofisticated as push notification.

Apple writes that push notification can be used to manage Today widgets:

https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/NotificationCenter.html

Perhaps for that reason including the NotificationCenter framework did trigger the warning, albeit mistakenly.

1
votes

This message is actually a warning to indicate that somewhere in your code, the methods for registering for a push token were used (indicating that your app is trying to use push notifications), but as the required entitlement is missing, this functionality is not going to work.

It seems at the moment If one doesn't use APN the warning can be ignored.

It's possible that a third party library has implemented this functionality, even if your app does not use it. In that case, you can ignore the warning. Although, you may want to understand what each library you include in your app is doing before publishing your app, to avoid unwanted surprises like this occurring in the future.

0
votes

I would start by searching the code for registerForRemoteNotificationTypes or registerUserNotificationSettings, which are both used to register for push notifications (depending on the version of the OS).

If you find one of them, that's the issue. You need to remove them, if you're not using notifications.

Perhaps the issue is that you're using Local notifications and accidentally registering for remote notifications as well?

0
votes

After 1 month of intensive research and trails, this worked for me: Missing Push Notification Entitlement warning

0
votes

I got this warning just by updating some pods (FacebookSDK is one of them). I assume one of them is implementing the UIApplicationDelegate method application:didRegisterForRemoteNotificationsWithDeviceToken: which is why i'll just ignore the warning from now on.