1

Apple sends the following email when submitting iOS app:

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.

George Asda
  • 2,119
  • 2
  • 28
  • 54
  • "Do I still need to register with Apple's Push Notification Service" No. And make sure you haven't enabled the remote notification background mode in the capabilities section of Xcode and that you are not calling registerForRemoteNotifications. – Gruntcakes Aug 20 '15 at 21:37
  • @Martin H where in Xcode would I find this: remote background mode? – George Asda Aug 21 '15 at 20:07
  • @GeorgeAsda: Is there anything else you may need to accept the answer below? – SwiftArchitect Aug 28 '15 at 14:37

1 Answers1

1

@GordonDove: Looks very plausible from where I'm sitting. registerUserNotificationSettings is producing false positives.

One way or another, your app is still invoking:

[[UIApplication sharedApplication] registerUserNotificationSettings:mySettings];

If you are absolutely positive you are not doing this, launch Terminal, cd to your project, and execute (do not forget the space dot trailing the grep command):

grep -r "registerUserNotificationSettings" .

It appears as so Apple does not discriminate between local and remote notifications.

SwiftArchitect
  • 47,376
  • 28
  • 140
  • 179
  • Why is registerUserNotificationSettings a no no in this context? This method is valid to call, and indeed must be called, if an app is displaying *local* notifications. This method is called if the app uses local *and/or* remote notifications. Its use on its own does not imply remote notifications are being used. Surely registerForRemoteNotifications is a more indicative method and more likely to result in that Apple message, as a call to registerForRemoteNotifications will fail if an app is not signed with an APNS entitlement. – Gruntcakes Aug 21 '15 at 21:22
  • @SwiftArchitect I believe is the first (Apple does not discriminate between local and remote notifications). Everything else has "failed" (still get the match after doing all these steps). – George Asda Aug 23 '15 at 19:33
  • 1
    I just got this warning too. Submitted betas a couple of days ago, no warning. Today, warning every time. I do use local notifications, so a) looks very plausible from where I'm sitting. registerUserNotificationSettings producing false positives. – Gordon Dove Aug 27 '15 at 14:30