alexandercerutti / passkit-generator

The easiest way to generate custom Apple Wallet passes in Node.js
MIT License
873 stars 108 forks source link

Generated pass is showing up as compressed (.zip) on iphone #178

Closed majal0link closed 1 year ago

majal0link commented 1 year ago

Hello, I am facing some issues Viewing my Generated pass (Generated and saved as a file then sent to the device), it is showing up as compressed (.zip) on my iPhone, I have tried opening the pass directly from WhatsApp, Email, and Discord with no luck, it only opened on Telegram.

What happened so far: What I know so far is that the pass is not been read properly as (.pkpass) but as (.zip) even though I have specified (contentType: 'application/vnd.apple.pkpass') when writing the file.

The proposed solution: Will try other ways to force file format, Will send the file directly to the client.

alexandercerutti commented 1 year ago

Hey, I don't know why other clients seems to be able to open it. Do Console.app say something more about it when you try to open it?

majal0link commented 1 year ago

Unfortunately nothing useful in Console.app via defualt Mac OS pass viewer, and I have a very old version of Mac OS so I can't test the pass with my iPhone. But the second solution worked well for me which is Sending/Showing the pass directly to the user.

And about the 1st solution, It is very complicated. I didn't go through the hustle of figuring out the right way to force format for iPhone ...etc. But I did try to download the same pass from WhatsApp and replace .zip with .pkpass, and it was showing the right pass in the preview (small file thumbnail), but when I did share it through WhatsApp it showed as an unknown pass (a text says that the file is a pass card...etc) without the option to add it to the wallet.

Ultimately, I chose the easy path of showing the pass to the user right away.