How to obtain Push Credential for your iOS app? | Appy Pie Help

How to obtain Push Credential for your iOS app?

By Abhinav Girdhar | Updated on April 26, 2022, 4:51 am

Configuring push credentials on Appy Pie’s Messenger page allows users to receive notifications in the iOS app. Follow the below steps to obtain your Push Credentials:

Step 1. Go to Twilio. If you have a Twilio account, log in, else Signup.


Step 2. Under the Develop tab, click Explore Products. 


Step 3. Under All Products, click Programmable Communications.


Step 4. Click the Chat option in the Programmable Communications section.

                                                                  
Step 5.  Under Push Credentials, click the + icon.


Step 6. Enter the required details in the dialog to create a new credential.


Step 7. Enter a name and select the APN Push Credentials as the credential type from the dropdown.

                                                                                                                              
Step 8.
 Provide the certificate and private key in the respective fields. To create the certificate key and private key, follow the steps below:



  1. Create an iOS Push Services (.p12) file. To create a p12 file, refer to How to Make a p12 File for iOS. p12 file will be used for extracting certificate key and private key.


  2. To create a certificate key, open Terminal and run openssl pkcs12 -in cred.p12 -nokeys -out cert.pem -nodes command. Once done, cert.pem file will be generated on your system. 


    Note: Before running the command, replace the name of the file in the command with the name of your p12 file. For example: If you have saved your p12 file as app_notification.p12, then replace cred.p12 in the command with app_notification.p12. Similarly, follow the same replacement in the steps (c & d) before running the command
  3. To create a private key, run openssl pkcs12 -in cred.p12 -nocerts -out key.pem -nodes command in terminal. Once done, key.pem file will be generated on your system. 


  4. Run openssl rsa -in key.pem -out key.pem in terminal to process the RSA key.

  5. Open the generated cert.pem file and key.pem file in the text editor.


  6. Exclude anything outside of "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" boundaries and outside of "-----BEGIN RSA PRIVATE KEY-----" and "-----END RSA PRIVATE KEY-----" boundaries and copy the rest.



Step 9. Paste the copied keys in the certificate and private key field, and tickmark the  'Sandbox' checkbox.
 Once you have provided the required details, click Create.



Step 10. Once done, you will find your generated Credential SID in the Properties section. Copy the Credential SID, then click the Manage menu and from the Manage menu, select Services. 


Step 11. Under Chat Services, click the + icon to create a new Chat Service.                


Step 12. Enter a name for your Chat Service, and click Create.


Step 13. Once your chat service is created, you will find the Service ID and other details on the Base Configuration page. Next, click Push Configuration in the side menu.


Step 14. In the New Message section, check the Enabled checkbox.                

Step 15. Click Save, then click the Back arrow in the side menu.


Step 16. Under the Develop tab, click Explore Products in the side menu.



Step  17. In the Programmable Communications section, scroll down to the Notify card, and then click Notify.


Step 18. Under the Notify dropdown menu, click Services.


Step 19. Click the + icon in the Services section.


Step 20. Enter a name for your Notify Service, then click Create.


Step 21. Select the APN Credential SID that you created in the previous steps from the dropdown menu. 


Step 22. Once you have selected APN credential SID, click Save.


Step 23. Paste the copied Credential SID in the respective field on the creator software.

 

Share this :

Was this article helpful?