alexalok/dotAPNS

Support for Apple Wallet notifcations

pauldunstone opened this issue · 4 comments

Hi all
Great library, thank you!
Any chance the library will work for Apple Wallet push notifications? Currently they send but don't update the pass.
Cheers, Paul

Quick update, the library does cover Apple Wallet push notifications :-)

If anyone else is struggling just set your bundle id to be the name of the pass certificate i.e. "pass.com.whatever" and set the push type to background.

Hi @pauldunstone,

thanks for taking your time to investigate the issue!

Hey @pauldunstone, would you be able to share the specifics of how you got this working? I've been sending the pushes without updating the pass, but I've been creating the APNS client using a X509 Cert, not using a JWT, since I can't seem to figure out how to configure my cert file for that (I'm using a .pfx right now)

When I look at the bundleId though, it is set to pass.com.mydomain, and the push type is a background push, so I'm not sure what else could be causing the disconnect.

Thanks in advance!

Hi @AverageCakeSlice. I can talk you through our implementation and hopefully that helps.

We are using the Token-based connection, I couldn't get it working with the certificate based approach. The token based connection seems like a much better approach as the token doesn't expire as far as I can see.
Yeah just make sure the bundle id matches the name of your Apple App Pass certificate exactly and get the right TeamId and KeyId as per the instructions.

I used this to send the push notification, not 100% sure if the custom property is required but I noticed in PushSharp a blank entry was required in the APS dictionary so I added that in:

 var push = new ApplePush(ApplePushType.Background)
                        .AddToken(notification.PushToken)
                        .AddCustomProperty(" ", " ", true);