We have a really weird problem with the remote notifications on iPhone. Device just doesn't receive remote notifications however registration works fine. We checked all certificates and also provisioning profile, also tried to send test notification directly from Azure, the same result as we send with our api. When app is installed from HockeyApp notifications works fine. In debug DidReceiveRemoteNotification
method is just not called.
public override async void DidReceiveRemoteNotification(UIApplication application, NSDictionary userInfo, Action<UIBackgroundFetchResult> completionHandler)
{
// Opened by push notification.
if (application.ApplicationState == UIApplicationState.Background || application.ApplicationState == UIApplicationState.Inactive)
{
// Make userInfo readable.
PushNotification notification = CrossDevice.Current.ConvertToNotification(userInfo);
}
// Process notification so we can attach to it's received event.
CrossAzurePushNotifications.Platform.ProcessNotification(userInfo);
// No data is altered.
completionHandler(UIBackgroundFetchResult.NoData);
}
Note: we are using AzurePushNotifications plugin