FirebaseMessaging.onMessage not working with CleverTap in IOS
Closed this issue · 6 comments
IOS: When notification form CleverTap in coming, App in foreground, notification from cleverTap does not go to the function FirebaseMessaging.onMessage
Hi @phucphamwolf,
Can you explain if you want to get call when push is received or when it is clicked?
@nishant-clevertap I want to get call when push is received.
@phucphamwolf In iOS, for getting call when app is in foreground you need to implement UNUserNotificationCenterDelegate method in your AppDelegate. You will receive a call in willPresent method. Refer doc: https://developer.apple.com/documentation/usernotifications/unusernotificationcenterdelegate/1649518-usernotificationcenter
@nishant-clevertap Does the CleverTap plugin have a function to support this, or do I have to code in native IOS?
@phucphamwolf
No you have to add it in your AppDelegate file. You can refer our sample app: https://github.com/CleverTap/clevertap-flutter/blob/master/example/ios/Runner/AppDelegate.m
Thanks @nishant-clevertap.