Registering App ID for use with Push Notifications
suggest changeThings you need
- A paid Apple Developer Program Membership
- A valid App ID and identifier for you app (like com.example.MyApp) which is not used before anywhere
- Access to developer.apple.com and Member Center
- An iOS Device to test (as Push Notifications don’t work on Simulator)
Enabling the APNs access for App ID in Apple Developer Center
1- Log in to developer.apple.com Member Center (the Account link on the home page)
2- Go to “Certificates”
3- Select “App ID” from left panel
4- Click on “+” on top right
5- Add App ID with Push Notifications option checked
6- Click on created App ID and select Edit
7- Click Configure in Push Notifications panel
8- Open Keychain Access app in your Mac
9- From Keychain Access menu, click Certificate Assistant -> Request a Certificate from a Certificate Authority
10- Enter your mail in the first text field
11- Enter your name in the second text field
12- Leave CA Email Address empty
13- Select Saved to disk rather than Emailed to the CA
14- Click Continue and upload the generated file
15- Download the generated file by Apple and open it while Keychain Access is open
Enabling the APNs access in Xcode
1- Select your project
2- Open Capabilities tab
3- Find Push Notifications and turn it on
4-Find Background Modes and turn it on and check Remote Notifications