Closed navane closed 4 years ago
Hi there! No need to replace the AppleWWDRCA.pem, you need both that global certificate, as well as your own certificate.
Please double check your passTypeId and teamId, and try to re-create your personal certificate from the steps in the README. I've had cases where the first time downloading the certificate would not work, but repeating that action a second time would. Seems like it might be a bug in the Apple Developer portal.
Thanks for replying back. When I checking README.md https://github.com/tschoffelen/php-pkpass/blob/master/README.md and example.php https://github.com/tschoffelen/php-pkpass/blob/master/examples/example.php
There were no information about changing own pem file.
Am I missing something still?
Check out the 'Requesting the Pass Certificate' section: https://github.com/tschoffelen/php-pkpass/blob/master/README.md#requesting-the-pass-certificate
Actually I am a server end(PHP) developer and implementing this feature for iPhone App. iOS developers has shared .p12 file, .pem file, passTypeIdentifier and teamIdentifier to me.
So I have configured the same at server end. Where I need to configure my own pem file other than AppleWWDRCA.pem in code level?
Thank you. Unfortunately I didn't get, where I have to place my own .pem file by referring example.php file?
I have added my own .pem file using below code in example.php file. But no luck. $pass->setWWDRcertPath(DIR . "/mydirectory/custom.pem"); So currently I am running with "AppleWWDRCA.pem" which already there in Certificate folder (Code was inbuilt in PKPass.php file) and "custom.pem" which I manually created from development tool.
As described in the documentation, you need to add the path to your .p12
file in the PKPass class constructor. No need to do anything with a PEM file or to edit the WWDR cert path.
I have added my own .pem file using below code in example.php file. But no luck. $pass->setWWDRcertPath(DIR . "/mydirectory/custom.pem"); So currently I am running with "AppleWWDRCA.pem" which already there in Certificate folder (Code was inbuilt in PKPass.php file) and "custom.pem" which I manually created from development tool.
Were you able to get this working @navane? I'm using php and was able to successfully create the pass and add to the passbook both on simulator and device. I also manually added the PKPass.php file like you. Let me know if I can help.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Expected Behavior
Open the pkpass file in iPhone as expected
Actual Behavior
Pkpass file generated. But when try to open in iphone, it is showing "Unable to Add. This file cannot be added to Passbok"
Steps to Reproduce the Problem
Please help to resolve my problem.