Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReceivedRemoteNotification not triggered after first notification received (iOS Xamarin Form) #164

Open
LeonardoPatti opened this issue Aug 21, 2018 · 2 comments

Comments

@LeonardoPatti
Copy link

I use the Plugin with Xamarin form on iOS,
I use the override method "ReceivedRemoteNotification(UIApplication application, NSDictionary userInfo)" in AppDelegate to process the push Notifications.
I notice that the first notification trigger this method and call the correct code to show the toast, but after the first notification, the toast still showed but this method is not triggered. Maybe the plugging overwrite it after the first notification?

@sachin031
Copy link

Facing same issue.

@bombez
Copy link

bombez commented Oct 8, 2018

Hi,
I've discover that

public INotificationResult Notify(INotificationOptions options)
{
var notificationCenter = UNUserNotificationCenter.Current;
...
notificationCenter.Delegate = new UserNotificationCenterDelegate(id, (identifier, notificationResult) =>
{
                lock (_lock)
                    if (_resetEvents?.ContainsKey(identifier) == true && _eventResult?.ContainsKey(identifier) == false)
                    {
                        _eventResult.Add(identifier, notificationResult);
                        _resetEvents[identifier].Set();
                    }
            }, options.ClearFromHistory, options.AllowTapInNotificationCenter);
}

that override the behave of the Notification Center when notify method is called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants