2

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?

Community
  • 1
  • 1
Michael
  • 239
  • 3
  • 12
  • Maybe this will help https://github.com/immobiliare/ApnsPHP – BugHunterUK Aug 30 '17 at 19:07
  • Hello @Michael , Would you please help me for pass , i have successfully added pass in wallet but while update pass from admin panel data not reflect on pass wallet. – Jay Mehta Sep 25 '18 at 06:10
  • We have received following logs while updadting pass. Log: {"logs":["[2018-09-25 11:50:09 +0530] Get serial #s task (for device 49deeaee707d67dbb44ac89480a58124, pass type PASSIDHERE, last updated (null); with web service url http:\/\/pass.abc.com\/admin\/mypkpass\/devices) encountered error: Server response was malformed (The data couldn’t be read because it isn’t in the correct format.)"]} – Jay Mehta Sep 25 '18 at 06:26
  • The web service url location is either wrong, or the code is not responding correctly. – Michael Oct 02 '18 at 12:50

2 Answers2

0

Fixed!

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

That fixed the issue.

Michael
  • 239
  • 3
  • 12
-2

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.

Slawa
  • 1,141
  • 15
  • 21