tschoffelen / php-pkpass

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

Not seeing background images #14

Closed dburr closed 11 years ago

dburr commented 11 years ago

Hi! First of all thanks for putting out this code.

Unfortunately I'm having trouble making some passes. Well actually the passes themselves work. The problem is that I never see the background image. The logo and icon appear to work fine; I just don't see the background image.

The images I'm using are within Apple's guidelines insofar as image size, etc.; and addFile() is successful (I check checkError() and it never returns true).

Here's the strange part. In the latest Mountain Lion OS, they added the capability to sync passes over iCloud (so you can get a pass using Safari on your desktop and it will sync it). It shows a preview of the pass when you click on it. That preview (on the desktop) does show my background image. However when I request my pass on my iPhone using Mobile Safari, it too shows a preview of the pass

Using Firefox I tried downloading the .pass files themselves so that I could examine them, in case they weren't being put together correctly. But my background image is there, and all the JSON files look correct (e.g. the manifest.jsonshows the correct SHA1 checksum, etc.)

I have even tried your Starbucks example (completely unmodified except for adding my certificate, Pass ID and Team ID), just in case I was doing something wrong with my code; but even the Starbucks sample never shows a background image.

I must admit I'm a bit stumped. Any ideas as to what might be going on here? Have I actually somehow managed to find a bug in iOS 6? ;-)

dburr commented 11 years ago

OK, my bad. Turns out that not every pass type supports every image type. The Store Card pass apparently does not support the background image; however it does support a "strip" image. I created one (really I just copied background.png to strip.png), added an addFile() for it, and now my passes are looking great.

Apple's Passbook Programming Guide has a lot of detailed info about how passes are put together, how they are laid out on-screen, etc. as well as the recommended image sizes for all the various images.

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.