Updating Pass for Apple Wallet - Could not extract archive

954 views Asked by At

Question 1

I am trying to set up server side for Apple passes so they can be updated. I am currently generating signed zipped passes, which also register to update my tables, with device tokens /id Etc.

The passes do not update with the new passes I generate (Same serial, auth token - different message/image)

In console I'm getting this error (fault):

BOM could not extract archive : Couldn't read PKZIP signature

Received invalid pass data (The pass cannot be read because it isn\U2019t valid

I am using https://github.com/tschoffelen/PHP-PKPass

Along with storing data & passes, and the webserviceurl php page on my server.

Any one got an idea on this?

Question 2

I am also getting an error (fault) in console:

Setting display properties with screenSize=(375, 667) scale=2

Not sure why, or if this even matters?

2

There are 2 answers

0
Michael On BEST ANSWER

Fixed!

I created my own version of a generator like the github link.

That fixed the issue.

1
Slawa On

The problem is in the way ZIP (pkpass) files are generated. I've looked at the code and it's using PHP's ZipArchive. Though the ZIP files generated can be extracted both on Windows and Linux without errors, Apple server is more picky.

I've tried PclZip as well, and it has the same problem.

The solution is to use system() call to zip files using the command-line zip command. The ZIP file generated this way is accepted by Apple.