1
votes

I am trying to achieve Apple Push notification for Passbook from C#. I am not getting any error or exception but the notification is not received on device.

Following are steps already taken
- I am trying it with production pass p12 certificate which I am using for Pass signing
- I am having my tcp port 2196 open as required by APNS
- I am sending empty Json payload and push token (which I am receiving from passbook when user adds pass to passbook and our service is invoked)

When I am trying to read response from the SSLstream I am getting it as \b\a\0\0\0\0

Any help will be great help. Thanks!

1
First, ensure you're using the right endpoint APNS endpoint. Second, are you seeing anything in the iPhone logs of the device you're pushing to? - Tomas McGuinness
Is your webServiceURL receiving a request for serials and is it responding appropriately? Is this request followed by a second request to receive the updated .pkpass bundle? Is the updated .pkpass bundle different to the original bundle? Is a changeMessage set for the value that has changed, and does this message contain %@? You are developing in C# and so may not have access to Xcode for debugging - if so and if your webServiceURL is a public URL, if you can post a link to the .pkpass bundle, we can help diagnose for you. - PassKit
@PassKit - I have all web services in place so when I am trying pull to update my getpass service is invoked and pass is updated, I can see that through device logs. Both the bundles are same as there is no change in pass content, my requirement is I need to show a push notification to user with some message in notification after 7 days of pass installation. I dont have changemessage field in pass.json. Do I need to add changeMessage? Wont it work without it? - Asif Mukhida
@tomasmcguinness - I am pointing to gateway.push.apple.com and port 2195. Mostly nothing is coming through still I will confirm it again and update here. - Asif Mukhida

1 Answers

0
votes

You DO need a changeMessage if you want anything to show on the lockscreen, but you could also consider a relevantDate alert if it is always after 7 days. The following answer details all of the mandatory requirements to invoke a lock screen message from a push to a pass. How to make a push notification for a pass.

Specifically note point 5:

alert, badge, sound and custom property keys are all ignored - the push's only purpose is to notify Passbook that your web service has a fresh pass. The notification text will be determined by the changeMessage key in pass.json and the differences between the old and the new .pkpass bundles