ClickCease
Abstract visualisation of iOS push notifications

How to set up iOS push notifications for your chat and social integration

Mark Worachote
Mark Worachote
Solutions Engineer
iOS
Aug 17, 2023

Push notifications have become a cornerstone of user engagement in app development. However, the process of integrating push notifications can sometimes be intricate and challenging. In this tutorial, we’ll walk you through the step-by-step process of setting up iOS push notification certificates with Amity, which already provide pre-set notifications system with very little setup. Our goal is to simplify the process and empower you to leverage push notifications effectively for enhancing user interaction.

Prerequisites

  1. This tutorial assumes that you have your iOS project on the GitHub repository and you have knowledge of git version control to some extent.
  2. If you haven’t already registered for an Amity account, we recommend following our comprehensive step-by-step guide on how to create your new network.

Step 1: Access Apple Developer Console

To begin, navigate to the Apple Developer Console, which serves as the hub for your app’s development journey. Visit developer.apple.com to join the platform. Once logged in, head to the “Certificates” section, which is where you’ll lay the groundwork for enabling push notifications in your app.

Step 2: Select the Appropriate Certificate

In this step, choose the “Apple Push Notification Service SSL (Sandbox & Production)” certificate. This single certificate covers both Sandbox and Production environments, simplifying the setup process by eliminating the need for separate certificates.

Note: Currently Amity supports production iOS push certificate only

Step 3: Generate the Certificate

Follow the provided instructions from Apple meticulously to generate your push notification certificate. This process will yield the crucial .cer file, a fundamental component for enabling push notifications in your app.

Step 4: Open the .cer File

Double-click on the downloaded .cer file to open it. Doing so will launch the Keychain Access program, which handles certificates on your device.

Step 5: Navigate Keychain Access

Inside Keychain Access, locate the “My Certificates” section within the “Login” keychain. Here, you’ll find the Apple Push Services certificate you installed earlier. Right-click on this certificate to reveal a context menu with various options.

Step 6: Export the Certificate

Choose the “Export ‘Apple Push Services…’” option from the context menu. Save the exported file with the .p12 extension. If you opt to set a password during the export process, make sure to retain it, as you’ll need it later.

Step 7: Upload to Amity Console

In the final step, access the Amity Console. Within the “Settings” section, you’ll find “Push Notifications”. This is where you’ll upload the .p12 file you exported earlier and input the password that you noted down earlier in step 6 if you have any. This .p12 file will serves as a bridge that connects your app to the push notification service.

Now you’re done with the certificate! As you can see in the Amity Console there are multiple notification options that you can toggle on or off.

You can also customize notification title and message from here as well by simply clicking the pencil icon next to the checkbox.

Final Thoughts: Streamlined Engagement at Your Fingertips

Congratulations! You’ve successfully completed the process of setting up iOS push notification certificates with Amity. By integrating push notifications, you’ve equipped your app with a powerful tool for enhancing user engagement. With this setup, you can now send timely and relevant notifications to your users, creating meaningful interactions and driving app usage.

As you continue your journey in app development, remember that push notifications are a conduit for forging connections with your users—seizing their attention, delivering value, and fostering engagement. Welcome to a new level of interaction and engagement in your app!

Registration

Once you’re done with this tutorial: learn how to register push notification on iOS.