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)
I restarted XCode and it was gone :-)