I fix this problem by enabling push notification capability.
Click on .xcodeproj -> Capabilities -> Enable Push Notification
I fixed this issue like this:
And try again!
Source:
You must have to enable Target—> capabilities—> push notification. I have faced this issue using Xcode 8.
Such problems are due to current Provisioning Profile does not contain APNS information, as the Provisioning Profile is created BEFORE creating the APNS certificate.
Therefore, to solve the problem, create a new Provisioning Profile & select the Provisioning Profile in Xcode. Then you are DONE.
Also, when you add push, I believe you have updated the certificates in keychain too.
Navigation for adding push notification capabilities has changed slightly on higher versions of Xcode. Here using 12.2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With