1

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??

Aditya Jaitly
  • 292
  • 2
  • 10

1 Answers1

0

By default, mesibo sends background notification and not the UI notifications. If you need UI notification, you need to change settings to Alert in the mesibo console.

Read more about it here https://mesibo.com/documentation/tutorials/first-app/push-notification/

mesibo
  • 3,970
  • 6
  • 25
  • 43
  • To debug, you can try sending push yourself and see your device is receiving it. You may use mesibo webhook to send your own push as described here https://mesibo.com/documentation/faq/webhooks-and-push-notifications/#i-am-not-able-to-receive-push-notifications-on-the-app-what-should-i-do – mesibo Jul 25 '20 at 03:37
  • That i mention in description i tested with the apn p12 file from pushtry receiving notification successfully but from mesibo i uploaded same file i cant able to have notification – Aditya Jaitly Jul 25 '20 at 06:56
  • @AdityaJaitly in that case, open a ticket with mesibo with all the details. – mesibo Jul 25 '20 at 07:53