Push Notification
Push Notification is a feature that Notify the about the call.
#
Call PushNotificationFor enabling push notification for calls in IOS, you need to generate a VOIP Services Certificates
in .p12
format with password. Once you have generated the VOIP certificate, share the .p12 along with its password to the server team for configuration in notificationservice.
The following screenshot shows the Audio Single Call PushNotification in Foreground and Background.
The following screenshot shows the Video Group Call PushNotification in Foreground and Background.
#
Add Notification Service ExtensionNotification Service extension is use to modify the contents of notifications before they are display and download the content
To obtain your Notification Service Extension you need to follow the below steps:
Step 1 : Create a new target for Notification Service with File > New > Target > Search Notification Service Extension, then Next.
Step 2 : When a dialog appears to activate the target extension, Give a name. For example: NotificationService, then click Finish.
Step 3 : The notification extension will come with a NotificationService.swift
. Open it and replace the content with the code below:
Step 4 : Add App Groups
to the target application and notification extension on the Signing & Capabilities tab.
#
Adding a Push Notification CapabilityTo use push notifications, you are required to add the push notification capability to your Xcode project. Select your target and then choose Signing & Capabilities
.
Enable all the below mentioned capabilities into your project.
Capabilities |
---|
App Groups |
Background Modes |
Push Notification |
Now, go to the background mode and enable the below given modes
Background Modes |
---|
Voice over IP |
Background Fetch |
Remote Notification |
#
Initialize Data for Call Push NotificationIn your project you must use the AppDelegate
class within the didFinishLaunchingWithOptions
method and also provide required data to build the Call Push Notification Builder. Let's have a look at the example given below.
Add the method UNUserNotificationCenterDelegate
and PKPushRegistryDelegate
like below: