I have integrated mesibo chat and tried to integrate the mesibo push-notification but not receiving the notification I had set up the .apn p12 file configured on mesibo push notification column and tested the notification by generating the token and tried a notification try with pushtry.com and got received notification on device.I confirmed that i have created certificate in right way.I successfully integrated notification on the android but ios i can't able to do it Here is my code setup for remote notification
//device token register
public override func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let tokenParts = deviceToken.map { data -> String in
return String(format: "%02.2hhx", data)
}
let token = tokenParts.joined()
deviceTokenString=token
}
// did Recieve method
override func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
Mesibo.getInstance().setAppInForeground(nil, screenId: 0, foreground: true)
}
Mesibo PushToken also implemented
Mesibo.getInstance()?.setAccessToken(accessToken)
fileTranserHandler = SampleAppFileTransferHandler()
fileTranserHandler!.initialize(accessToken:accessToken)
Mesibo.getInstance()?.setPushToken(deviceTokenString, voip:false)
Mesibo.getInstance()?.setDatabase("mesibo.db", resetTables: 0)
Mesibo.getInstance()?.addListener(self)
Mesibo.getInstance()?.start()
Can Anybody tell why i am not recieving the notifcation and correct me if i am wrong.I have done research on it here mesibo said about its push notification.
By default, mesibo sends background notification that wakes your app in the background, and then the application can start mesibo to receive all the messages. This is a recommended way of receiving push for real-time application as it gives you the finer control. However, You can change this default behavior from the mesibo console by disabling the Background push checkbox. It will then send visible push alerts.
Can any body if i get app in background how can i generate the custom ui notification in background??