assaf / node-passbook

iOS Passbook for the Node hacker
MIT License
281 stars 73 forks source link

Trouble getting the passes to load #74

Open scomma opened 3 years ago

scomma commented 3 years ago

Hi, I wasted half a day on this problem and found a solution that I want to share since I assume this project is unmaintained.

If you could generate the pkpass with the library but macOS/iOS refuses to load the pass, use PKPassValidator to figure out what's wrong:

https://pkpassvalidator.azurewebsites.net

In my case it highlighted "TeamIdentifer in signature matches value in pass.json" as problematic.

So I dug into PKPassValidator's source to figure out how that flag came to be. It's saying my template's teamIdentifier doesn't match up with the signature, specifically the OU field.

I opened up the certificate in my keychain and under the subject being certified, it listed Organizational Unit as WLJTXXXXXX. Copied that value into the source code (passed as an argument to createTemplate) and now the passes load correctly.

Hope this helps someone.