TobiasBuchholz / Plugin.Firebase

Wrapper around the native Android and iOS Firebase Xamarin SDKs
MIT License
220 stars 49 forks source link

[iOS] calling completion in didReceiveNotificationResponse:completionHandler #106

Closed shinya-terasaki closed 1 year ago

shinya-terasaki commented 1 year ago

Thank you for publishing the library.

May I ask one point?

I got a following warning in an iOS app when I processed an in-coming notification.

Warning: UNUserNotificationCenter delegate received call to -userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler: but the completion handler was never called.

May I ask that completionHandler is not need to be called in userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler: ?

https://github.com/TobiasBuchholz/Plugin.Firebase/blob/development/src/iOS/CloudMessaging/FirebaseCloudMessagingImplementation.cs#L75-L83

According to the API document,

The block to execute when you are finished performing the action. You must call this block at some point during your implementation.

Since it is warning, it may not have a big impact though.

TobiasBuchholz commented 1 year ago

At least for me it didn't have any impact so far. Nevertheless I've created a fix for that so in the next plugin version it will be included and the error message shouldn't appear anymore.