Why "add Push notification feature to your app id" warning even after push-notification showing enabled in App ID?

Sandesh Sardar picture Sandesh Sardar · Nov 9, 2016 · Viewed 29.6k times · Source

I am using Xcode8, swift 3, iOS 10

In Targets -> capabilities showing "add the Push notification feature to your app id".

I check my APP ID and it is showing pushnotfication enabled in both development and distribution.

With same APP IS and certificate I am getting notification in iOS9 but in iOS 10 i am getting error

Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo={NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}  

and also showing red mark (issue)

Answer

SteMa picture SteMa · Nov 18, 2016

I restarted XCode and it was gone :-)