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.
Author by
Alex
Updated on June 17, 2022Comments
-
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:
-
Alex over 10 yearsI'm developing on Windows and don't have access to the simulator. The certificate was generated today.
-
PassKit over 10 yearsStill 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 over 10 yearsWe use the upper WWDR certificate from here: apple.com/certificateauthority And here is the pkpass file: mediafire.com/download/n8p1z764o1zdjdv/pass.pkpass
-
lucafik over 10 yearsHi 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 over 10 yearsThe 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 almost 10 yearsYou can omit the
"webServiceURL"
and"authenticationToken"
fields. They're optional and only relevant for "pass updating" I believe. -
Alex almost 10 yearsWe use them because we need pass updating.
-
Tom Roggero about 9 yearsthis should be the real answer.