tschoffelen / php-pkpass

💳 PHP class for creating passes for Wallet on iOS.
https://includable.com
MIT License
901 stars 185 forks source link

Invalid data error #112

Closed vogaluk closed 2 years ago

vogaluk commented 2 years ago

I am getting 2 errors when running example.php on my device. I have followed all steps advised.

Invalid data error reading pass pass.my.pass/123456. Manifest signature did not verify successfully and assBook Pass download failed: Error Domain=PKPassKitErrorDomain Code=1 "(null)"

tschoffelen commented 2 years ago

Hi there! This error is usually triggered when an invalid certificate is used, or a certificate that doesn't match the Pass ID and Team ID specified in the pass's JSON payload.

vogaluk commented 2 years ago

Hi! Yes, I thought this. However everything is correct...

vogaluk commented 2 years ago

Also, from step 5, when I drag the cert into keychain, no private key (or arrow) shows...

Screenshot 2021-11-25 at 16 02 35
tschoffelen commented 2 years ago

Seems like Apple, as per usual, has changed the Keychain access slightly without updating the documentation in the macOS update a few weeks ago.

https://help.apple.com/developer-account/#/devbfa00fef7

You will need to select both the private key you created to generate the certificate signing request, and the pass certificate, and export them together as a .p12 file.

vogaluk commented 2 years ago

Thanks. Managed to do that now. Still get the same errors though!

Screenshot 2021-11-25 at 16 24 21
tschoffelen commented 2 years ago

The pass type ID that is shown in the keychain screenshot doesn't match the pass type ID in the log in your last comment. That might be related?