processNotificationWithInfo()

Note: This API was deprecated in version 10.0.0. Use handlePushNotificationAction() instead.

This API can be used to process the received push notification data and display the message.

Syntax:

CopiedZohoSalesIQ.processNotificationWithInfo(info: [AnyHashable: Any]?)

Example

Copiedfunc application(_ application: UIApplication, didReceiveRemoteNotification
	userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler:
	@escaping (UIBackgroundFetchResult) -> Void) 
	{
		ZohoSalesIQ.processNotificationWithInfo(info: userInfo)
		completionHandler(UIBackgroundFetchResult.newData)
	}
	func application(_ application: UIApplication, didReceive notification:
	UILocalNotification)
	{
		ZohoSalesIQ.processNotificationWithInfo(info: notification.userInfo)
	}
	@available(iOS 10.0, *)
	func userNotificationCenter(_ center: UNUserNotificationCenter,willPresent
	notification: UNNotification,
	withCompletionHandler completionHandler: @escaping
	(UNNotificationPresentationOptions) -> Void) 
	{
		completionHandler(UNNotificationPresentationOptions.alert)
		ZohoSalesIQ.processNotificationWithInfo(info:
		notification.request.content.userInfo)
	}
	@available(iOS 10.0, *)
	func userNotificationCenter(_ center: UNUserNotificationCenter,didReceive
	response: UNNotificationResponse,
	withCompletionHandler completionHandler: @escaping () -> Void) 
	{
		if response.actionIdentifier == UNNotificationDismissActionIdentifier 
		{
			// The user dismissed the notification without taking action
		}
		else if response.actionIdentifier == UNNotificationDefaultActionIdentifier 
		{
			ZohoSalesIQ.processNotificationWithInfo(info:
			response.notification.request.content.userInfo)
		}
	}