Missing Push Notification Entitlement
Asked Answered
C

9

103

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. How can this be fixed?

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

Cliquish answered 27/8, 2015 at 13:46 Comment(6)
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.Safier
@Cliquish 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.Prostration
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.Tetrachord
Ditto, I have been getting the same email warning on a new app that does not use Push Notifications.Repute
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?Mikes
For me, this started when I implemented the Instabug pod, without any APNS in my own part of the app.Provenance
A
102

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

Animality answered 29/8, 2015 at 7:47 Comment(5)
I too suspect the same. Lets wait for some more time to check if anyone has solution for this. @AnimalityCliquish
Updated with a quote from Apple that supports that you can ignore it.Animality
I got the same warning when using Xcode 6.4 to submit the app, then I tried to use Xcode 7 GM to resubmit the same app and there is no warning anymore.Ambience
For me I found that Firebase uses this method so if someone has this using Firebase, safely ignore it.Cumings
I got the same message, and I tried many things to prevent it from sending, including testing the removal of the Firebase packages. I couldn't find a solution, and the only workaround seems to be to add the capability, even though I'm not using. Still seems like a bug in 2021.Companionway
T
30

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!

Trove answered 1/9, 2015 at 5:55 Comment(6)
I've checked all of the above and none of this was the cause of the issue. However I still haven't try to generate any new provisioning profiles.Nisi
I believe you have to create a new mobile provisioning whenever you change something in your app settings in the developer center. That may be it!Trove
It seems it is necessary to generate again your application mobile provisioning when you edit which services it uses. After all the enabled services are listed in the mobile provisioning description.Trove
I have done all these things and also created new provisioning profile too. yet this problem is not solved.Cliquish
Are you sure you're not using any third-party framework that may implement remote notifications?Trove
I am not using any third party framework I am pretty sure about that. I have already mentioned it several times.Cliquish
M
9

Go to Target > Capabilities,

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

Maricamarice answered 3/10, 2016 at 12:34 Comment(0)
S
3

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.

Strander answered 21/9, 2015 at 11:18 Comment(0)
M
1

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.

Molder answered 19/9, 2015 at 20:42 Comment(0)
R
0

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?

Rivers answered 27/8, 2015 at 13:59 Comment(4)
Already checked this. I am using only NSNotificationCenter for adding observer and postNotificationName. Other than that I have no other notifications code. Also I am using ANetworking framework which is also not using any remote notifications.Cliquish
Does your app, by any chance, appears as one of the apps in the "Notifications" section of the "Settings" app on the device?Rivers
Checked that also it is not listed under notifications in settings.Cliquish
What's for local notification register ?Consequence
A
0

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

Amberjack answered 17/9, 2015 at 18:37 Comment(0)
N
0

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.

Neighboring answered 14/7, 2019 at 8:36 Comment(0)
D
0

I was sent this message after I added NSPhotoLibraryUsageDescription... NSPhotoLibraryUsageDescription Permission to access photo gallery ... Since I built in flutter then used Xcode to publish, I added a new build number in pubspec.yaml and closed Flutter. Then in Xcode, I also added the new build number.

Making sure that both Flutter and Xcode were closed, use the terminal to navigate to the directory of my project and did the following:

flutter clean flutter build ios

After uploading the new build using Xcode, I did not get the warning again.

Dinse answered 15/8, 2021 at 20:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.