2
votes

I found a few posts related Azure notification hub support on PushKit VoIP notifications:

https://social.msdn.microsoft.com/Forums/ie/en-US/afda14fe-1218-4ca1-a1ee-205ccd241d1a/support-for-apple-voip-pushkit-push-notifications?forum=notificationhubs

https://social.msdn.microsoft.com/Forums/azure/en-US/39b4e1cd-842f-4562-bab5-119d5f6175cd/send-ios-voip-pushes?forum=notificationhubs

Does GCM works with iOS PushKit framework?

There's no official confirmation of the support, I did try myself by using same APN HTTP/2 configuration on my notification hub which you can use for either APN Notifications or PushKit VoIP Notifications but always got invalid token on registration to notification hub.

Have anyone make this work with Azure notification hubs? Is there support for this or not?

3

3 Answers

2
votes

It seems to be supported if you use Authentication Mode Certificate with a VoIP Services Certificate but not if you use Authentication Mode Token with Token-based (HTTP/2) Authentication for APNS.

So to get this working use a VoIP Services Certificate and on Apple Notification Hub Configuration set Authentication Mode Certificate with this VoIP certificate.

1
votes

It started to work, but you have to:

  • use Token Authentication Mode with HTTP/2
  • add .voip suffix to Bundle Id
  • specify apns-push-type to voip when sending notification. (Added because of iOS13)

        var headers = new Dictionary<string, string>();
        headers.Add("apns-push-type", "voip");
        var notification = new TemplateNotification(parameters);
        notification.Headers = headers;
        await hub.SendNotificationAsync(notification);
    
0
votes

I test with Certification mode and VoIP Certificate, but PushKit delegation method which is

pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith....

was not trigged.

This method was trigged:

application(_ application: UIApplication, didReceiveRemoteNotification