iOS Push Notifications Registering App ID for use with Push Notifications


Things 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 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 Member Center (the Account link on the home page)

enter image description here

2- Go to "Certificates"

3- Select "App ID" from left panel

enter image description here

4- Click on "+" on top right

enter image description here

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

enter image description here

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