rdelrosario / xamarin-plugins

Cross platform Xamarin & Windows plugins for PCLs
MIT License
179 stars 161 forks source link

Problem receiving push in iOS 11 #142

Closed CR4567 closed 6 years ago

CR4567 commented 6 years ago

Hi, does anyone else recognize problems with receiving push notifications with iOS 11? Same code on two devices iOS 10 and iOS 11. On iOS 10 everything works fine but on iOS 11 it asks for the permissions to receive notifications, but afterwards doesn't get the device token from the apns.

Did they change something on the behavior of the push service? I can't find anything about it and it seems that nobody else had problems with the update...

kspearrin commented 6 years ago

I too am having issues. Registration works fine, but when I get a push notification OnMessageReceived for my listener is never called.

After debugging further, it seems that neither DidReceiveRemoteNotification nor ReceivedRemoteNotification from AppDelegate.cs are called. These are what call into OnMessageReceived on the listener.

I can send the following push to my device:

{"aps":{"alert":"an alert","badge":null,"content-available":1}}

I receive the alert on the device, so I know that it was received, however, the above notification methods are never hit.

This was all fine until iOS 11.

Ref code:

kspearrin commented 6 years ago

@CR4567 See https://stackoverflow.com/questions/44796613/silent-pushes-not-delivered-to-the-app-on-ios-11/46455236#46455236

CR4567 commented 6 years ago

thanks for the information. My problem is not really with the silent push but it seems that were some issues with the new iOS. For me it seems that some of the services did not start correctly. After some changes and restarting my device, everything is working again. So definitely not a problem of this plugin, so I will close this issue.