pkpass won't open on iOS from e-mail attachment

14,013

Solution 1

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

Solution 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.

Share:
14,013
Alex
Author by

Alex

Updated on June 17, 2022

Comments

  • Alex
    Alex about 2 years

    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

  • Alex
    Alex over 10 years
    I'm developing on Windows and don't have access to the simulator. The certificate was generated today.
  • PassKit
    PassKit over 10 years
    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.
  • Alex
    Alex over 10 years
    We use the upper WWDR certificate from here: apple.com/certificateauthority And here is the pkpass file: mediafire.com/download/n8p1z764o1zdjdv/pass.pkpass
  • lucafik
    lucafik over 10 years
    Hi Alex, could you please elaborate on the "authentication token" issue? How did you set it? I seem to have the same problem. stackoverflow.com/questions/21705439/…
  • Alex
    Alex over 10 years
    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"
  • Adil Hussain
    Adil Hussain almost 10 years
    You can omit the "webServiceURL" and "authenticationToken" fields. They're optional and only relevant for "pass updating" I believe.
  • Alex
    Alex almost 10 years
    We use them because we need pass updating.
  • Tom Roggero
    Tom Roggero about 9 years
    this should be the real answer.