0

I am working on a calling app where we are using pushkit notifications the problem is that I am not receiving notifications in debug mode with a Development profile. I am having the certificates installed and push notification certificates uploaded on App Identifier on the Apple account.

Whereas it is working in release mode. On the server-side, we are using APNs

Siddhant maurya
  • 261
  • 1
  • 2
  • 12

3 Answers3

0

You need to have development listed in your entitlements.plist.

    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>aps-environment</key>
        <string>development</string>
    </dict>
    </plist>

You also need to make sure that your APNS settings have use Sandbox instead of Production. I can't remember the specific setting this applies too, but it's pretty easy to spot.

ottermatic
  • 992
  • 6
  • 10
0

Also one more thing to check: PushKit token is not equals to the device's push notification token. Make sure when you send the VOIP notification, that you entered the PushKit token, instead the classic push notification token. Your VOIP token can be accessed by implementing IPKPushRegistryDelegate on your AppDelegate.cs

Bandi Tóth
  • 167
  • 1
  • 9
0

Making few minor corrections in APNS server-side code fixed the issue

request.Headers.Add("apns-id", Guid.NewGuid().ToString("D"));

request.Headers.Add("apns-push-type", "voip");

Hope this will help someone else facing this issue

Siddhant maurya
  • 261
  • 1
  • 2
  • 12