4

All websites mention that Passbook passes can be sent by e-mail. But when the pass (generated by our server) is attached to an e-mail, the iOS e-mail client won't open it and write "(null)" instead. The same pass works fine on Android and also has no problems communicating with our web service. Any ideas? Google searches didn't offer any solutions.

Screenshot:

enter image description here

Nazik
  • 8,696
  • 27
  • 77
  • 123
Alex
  • 103
  • 1
  • 1
  • 10
  • Alex, was this question for ios6 or ios7? I'm having a similar issue, but I've not been able to solve it yet. – SAL Dec 05 '13 at 00:24
  • For both but we only tried it on iOS 7. iOS seem to be very strict with field validation. For example it wouldn't work if the value of one of the fields was null. Did the 'solved' post below help you? – Alex Dec 06 '13 at 09:08
  • Alex, I went through and recreated all of the certificates and completely overhauled my approach using Simon Waldherr's approach (https://github.com/SimonWaldherr/passkit.php). I do have it working now on iOS 7. Thanks for starting this post. – SAL Dec 06 '13 at 14:36

2 Answers2

4

Solved: There were multiple problems:

  • The authentication token has to be at least 16 characters long
  • I used the "Apple Inc. Root Certificate" (wrong one) instead of the "AppleWWDRCA" (correct one)
  • For production the web service needs to use https
Alex
  • 103
  • 1
  • 1
  • 10
  • Hi Alex, could you please elaborate on the "authentication token" issue? How did you set it? I seem to have the same problem. http://stackoverflow.com/questions/21705439/safari-ios-cannot-open-passbook-pkpass – lucafik Feb 11 '14 at 15:20
  • The value for the field "authenticationToken" in pass.json has to be at least 16 characters long. So just put something like this in your json: "authenticationToken":"1234567890abcdef" – Alex Feb 13 '14 at 09:51
  • 1
    You can omit the `"webServiceURL"` and `"authenticationToken"` fields. They're optional and only relevant for "pass updating" I believe. – Adil Hussain Sep 09 '14 at 15:50
  • We use them because we need pass updating. – Alex Sep 11 '14 at 09:51
2

You get that when the pass in invalid, most likely due to it being incorrectly signed and/or the pass certificate has expired.

Drag your pass into iPhone Simulator and check the Console app to look for error in the logs.

passforce
  • 66
  • 1
  • I'm developing on Windows and don't have access to the simulator. The certificate was generated today. – Alex Nov 20 '13 at 12:16
  • Still sounds like a signing error. Are you including the WWDR certificate and a signing date? If you can attach a link to your .pkpass bundle we can take a look. – PassKit Nov 20 '13 at 12:25
  • We use the upper WWDR certificate from here: http://www.apple.com/certificateauthority/ And here is the pkpass file: http://www.mediafire.com/download/n8p1z764o1zdjdv/pass.pkpass – Alex Nov 20 '13 at 13:04
  • this should be the real answer. – Tom Roggero Apr 16 '15 at 22:45