tschoffelen / php-pkpass

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

How to add personalization files ? #79

Closed GCalmels closed 6 years ago

GCalmels commented 6 years ago

Hey, Thank you for this library !

I would like to know if it is possible to add personalization files like personalization.json for Reward Enrollment?

I tried addFile without any success !

Thanks Gabriel

tschoffelen commented 6 years ago

addFile should work for that. Can you share some of your code?

GCalmels commented 6 years ago

Ok, I will try again :) My code is :


$personalisationFile = self::PASS_DIRECTORY . 'personalization.json';
$pass->addFile($personalisationFile, 'personalization.json');`
tschoffelen commented 6 years ago

And do you get an error from the script itself, or does it just not work on the Wallet-side?

Because I think you might also need to include the files personalizationLogo@1x.png, personalizationLogo@2x.png and personalizationLogo@3x.png to make rewards enrollment work. From the docs:

Use a 150 x 40 point png file. This logo is displayed at the top of the signup form.

GCalmels commented 6 years ago

It just not work on the Wallet side... it seems to be an invalid pass ! But addFile add personalization.json in the manifest !

My bad, I have an error in Console : Passes with an NFC dictionary or a Personalization JSON file must be signed with an enhanced Passbook certificate.

Thanks for your responsiveness 👍

lock[bot] commented 6 years ago

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.