Why "add Push notification feature to your app id" warning even after push-notification showing enabled in App ID?
IosXcodePush NotificationApple Push-NotificationsIos10Ios Problem Overview
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)
Ios Solutions
Solution 1 - Ios
I restarted XCode and it was gone :-)
Solution 2 - Ios
Close Xcode -> reopen -> clean -> build -> run.
Fixed the issue for me. Xcode 9.0.
Solution 3 - Ios
Sadly I quit xcode then installed the .mobileprovision (double clicking it) then restarted xcode and the warning was gone...Followed the other answer here by SteMa
Solution 4 - Ios
This happened to me. For some reason xCode signed me out. The fix: Tap Xcode (top bar) -> select Preferences -> select your Apple Id -> Sign-in. Hope this helps someone!
Solution 5 - Ios
In my case it does not help restarting xcode again.
I just restart system and that problem was gone.
Solution 6 - Ios
After I enabled push for my app, I had to regenerate my provisioning profiles and re-download them for Xcode to recognized the aps attribute.
Solution 7 - Ios
In my situation I went to here & here
under the general tab in xCode settings and reset my bundle identifier to a different name and it fixed the certificates and everything worked!
Obviously if you need the same bundle identifier you will need to go with some of the other suggestions here, but use this if all else fails.
Solution 8 - Ios
In my case, none of the above answers worked. I had to generate new certificates. Xcode >> Preferences... >> Accounts >> select team >> Manage Certificates... >> + >> iOS Development >> repeat + >> iOS App Store.
Solution 9 - Ios
IF you have enabled Push notification ,your old Provisioning profile become inactive . Edit that old Provisioning profile and download fresh one , then try to generate the build .
Solution 10 - Ios
Check Info.plist -> Bundle identifier and establish it as YourProject -> Targets -> General -> Bundle identifier. Work for me
Solution 11 - Ios
Change your developer account in Xcode, because of APNS certificates developer account and Xcode developer account must be same.
--> Go to Target
--> Go to General Tab
--> GO to Signing
--> Select Team, Which account you used to develop APNS certificates.