Overview
In today's mobile Internet era, Mobile PUSH (mobile push notifications) plays a crucial role in enhancing user engagement and application activity. It can promptly deliver important information to users, such as new message reminders, event notifications, product updates, etc., enabling users to stay informed about application-related developments even when they haven't actively opened the application. Through push notifications, your application can remain in the user's line of sight, increasing user stickiness and preventing it from being forgotten due to long periods of inactivity. For our CX product, supporting custom Rebranding APPs to upload push certificates is to meet the personalized needs of diverse customers, ensuring that they can smoothly send accurate and reliable push notifications to their end-users, and guaranteeing the stable and efficient operation of the Push Notification function.
1. Principle Introduction
Push Principle of APNS and FCM
Both Apple Push Notification Service (APNS) for iOS and Firebase Cloud Messaging (FCM) for Android/iOS/Web operate on a similar basis. The application server, when needing to send push notifications, first sends a request to the corresponding push service server (APNS or FCM). For authentication, it must hold the proper credentials, like a push certificate for APNS (which requires a series of steps to obtain, including generating a Certificate Signing Request) and a server key for FCM. These servers, upon receiving and authenticating the request, use unique identifiers associated with the devices. APNS relies on Device Tokens generated during iOS app installation, while FCM uses Instance IDs created when the device interacts with Google services. Based on these identifiers, the push service servers accurately dispatch the notifications to the target devices, ensuring users get the relevant messages.
2. How to configure - iOS Apply Certificate
Steps to Download iOS App Certificate:
Log in to Apple Developer Account: Visit the Apple Developer Center (https://developer.apple.com/), and log in using your developer account. Ensure that your account has the corresponding permissions to create and manage push certificates.
Enter the Certificate Management Interface: On the home page of the Developer Center, navigate to the "Certificates, Identifiers & Profiles" section.
Create a New Push Certificate: Click on the "Certificates" tab, and then select the "+" button to create a new certificate. During this process, you need to select the "Apple Push Notification service SSL (Sandbox & Production)" option, depending on whether your application is in the development and testing stage or the official launch stage. Fill in the necessary information as prompted by the system, such as the application's Bundle ID.
Generate Certificate Signing Request (CSR): On your local Mac computer, open the "Keychain Access" application. Select "Certificate Assistant" -> "Request a Certificate from a Certificate Authority", fill in the relevant information as guided by the wizard, such as your email address, common name, etc., and choose "Save to Disk" to generate a
.csr
file.Upload CSR and Download Certificate: Return to the certificate creation page in the Apple Developer Center, and upload the
.csr
file just generated. After the upload is completed, the system will generate and provide a downloadable push certificate file, usually in.p12
format. Download the file and keep it properly, as it will be used later when configuring iOS push in the CX product.
3. How to configure - Android Apply Certificate
Steps to Download Android App Certificate:
Log in to Google Firebase Console: Open the Firebase Console (https://console.firebase.google.com/), and log in using your Google account. If you haven't created a Firebase project for your project yet, create one first.
Enter Project Settings: In the Firebase Console, select your corresponding project, and then click on the project settings icon (usually a gear shape).
Generate Server Key: On the project settings page, navigate to the "Cloud Messaging" tab. Here, you can find the "Server key" field. Click on the "Generate key" button, and complete the key generation operation as prompted by the system. The generated server key will be used for authentication with the FCM server.
Get Configuration File: At the same time, on this page, you can also download the "
google-services.json
" configuration file, which contains the key configuration information of your project in the FCM service, such as project ID, application ID, etc. Download the file and keep it properly, as it is crucial for Android applications to correctly receive push notifications.
4. How to configure CX
Steps to add a Mobile PUSH app on CX super administrators:
Open the Mobile PUSH Configuration Page: Log in to the super administrator end -> Advanced -> Mobile PUSH.
Click the plus sign to enter the Mobile PUSH Application configuration page and fill in the APP name and the environment to which the current APP is connected.
For iOS certificates, select the previously downloaded
.p12
format certificate file to upload, and fill in the corresponding password (if the certificate is password-protected). At the same time, enter the Bundle ID associated with the certificate to ensure that the system can accurately identify the iOS application corresponding to the certificate.
For Android certificate configuration, upload the "
google-services.json
" file, and fill in the generated server key into the specified field. After completing these configurations, the system will perform a series of verification operations to ensure the validity of the certificates and the accuracy of the configuration.
Super administrators can view the configuration status feedback on the configuration page, such as configuration success, certificate expiration, key error, etc., so as to adjust the configuration in time.
6. Effect Overview
Mobile iOS Push
When the push certificate of the iOS application is correctly configured in the CX product, the application server can smoothly send push requests to the APNS server. After the user's iOS device receives the push notification from the APNS, a prominent notification banner will appear at the top of the screen or on the lock screen. The notification content includes the application icon, title, subtitle (if set), and brief message content. The user can directly click on the notification to open the corresponding application program and enter the relevant function page, achieving seamless information interaction.
Mobile Android Push
Similarly, on the Android side, once the relevant certificates and the connection to the FCM service are configured, the push messages sent by the application server will quickly reach the user's Android device through the FCM server. The device will display a notification in the notification bar, and the notification style follows the Android system specifications, which can include the application icon, title, message summary, etc. The user can pull down the notification bar to view the detailed notification content, and click on the notification to launch the application or directly jump to the specified page within the application, ensuring that the user does not miss any important information.