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

How to obtain Push Credential for your iOS app?

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

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

2. Once you have logged in, click on the 3 dot icon in the navigation menu. 

3. Under Communications Cloud, click on Programmable Chat.    4. Click on the + icon under Push Credentials to create new credentials. 

5. A popup will open where you can enter the required details to create credentials.

6. Enter name and select APN Push Credentials as the credential type from the dropdown menu.   
7. Provide the certificate and private key in the respective fields.
To create the certificate key and private key, follow the steps below:

a.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.

b.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: Prior to run 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

c.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. 

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

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

f.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.

8. Paste the copied keys in the certificate and private key field, and tickmark the  'Sandbox' checkbox.
Once you have provided all the details, click on Create.

9. Here you can check your generated Credential SID and other credential details. Copy the credential SID to your clipboard. Now, click on Dashboard under Programmable Chat.

10. Click on the +icon under Chat Services.

11. Enter a name for your chat service and click on Create.

12. Here, you can check your configuration details including Service SID. Now, click on Push Configuration in the sidebar. 

13. Check the ‘Enabled’ button under the New Message section.

14. Click on Save and then click on the 3 dot icon in the navigation menu.

15. Under Engagement Cloud, click on Notify to update your Service with the APNS credential SID.

16. Click on Services in the sidebar. 

17. Click on the +icon to create a new service or select an existing service. 

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

19. Once done, click on Save.

20. Now, paste the copied Credential SID in the ‘Push Credential iOS’ field on the creator software.


Share this :

Was this article helpful?