Push Notifications not being received on iOS 10, but working on iOS 9 and before : <p>I have several apps that were written in Swift 2.2, compiled with Xcode 7.3 and is live on the App Store. The apps utilize Push Notifications and is working fine in iOS 9.3 and earlier.</p>

<p>On devices that have been upgraded to iOS 10, however, my apps don't receive any Push Notifications. Devices that are still running iOS 9 are still receiving notifications.</p>

<p>Thinking it might be a certificate or entitlement issue, I have tried the following:
Upgraded one of my apps to Swift 2.3, added the APS Environment Entitlement and compiled it in Xcode 8 but this made no difference.</p>

<p>In my AppDelegate I still have the existing methods to register for push notifications that includes:</p>

<pre><code>let notificationSettings = UIUserNotificationSettings(forTypes: [.Badge, .Sound, .Alert], categories:nil)
application.registerUserNotificationSettings(notificationSettings)
</code></pre>

<p>This registration seems to be successful even on iOS 10 since <em>Application didRegisterForRemoteNotificationsWithDeviceToken</em> is then called, so I am receiving a token from APNS.</p>

<p>The problem is that when I send a push notification to this device, <em>Application didReceiveRemoteNotification</em> is never called.</p>

<p>Now, <a href="http://cleanswifter.com/ios-10-local-notifications/">here</a> it is said that the methods on UIApplicationDelegate is deprecated on iOS 10 and I should implement userNotificationCenter(<em>:didReceive:withCompletionHandler:) and userNotificationCenter(</em>:willPresent:withCompletionHandler:)</p>

<p>The problem is that I am not ONLY targeting iOS 10. I still need the app to work on iOS 8 and 9 so I doubt that it's the correct approach to implement those methods.</p>

<p>How do I get push notifications for an existing app to continue working on devices that have been upgraded to iOS 10? Do I need to rewrite code? Do I just need to update some certificates or entitlements and recompile in Xcode 8 with some "new" settings?</p>
