eymengunay / php-passbook

iOS passbook library for PHP
http://eymengunay.github.io/php-passbook/
MIT License
263 stars 53 forks source link

Can't add background image. #68

Open montelco opened 7 years ago

montelco commented 7 years ago

The icon, using a PNG, works. But using a PNG background makes the pass fail to validate.

dennisp93 commented 7 years ago

Same problem here, i add the image the same way as the other images. Logo does work correctly, strip too.

$background = new Image($this->backgroundFile, 'background'); $pass->addImage($background);

I think the pass is packed correctly, every file is in the .pkpass package, another idea why background image is not working?

Thanks!

dennisp93 commented 7 years ago

Found a "solution".

https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/PassKit_PG/Creating.html

As you can see in Table 4-1, only one special type of Event Ticket can have a background image. In this table is listed which layout can have which images. Maybe the library should add a check in the validator for that.