Can't download pkpass from Chrome in iOS

I'm using the php code below to serve the pkpass file to the users...


<?php
$pkpass_file = 'passwebservice/output/abc123.pkpass';
header("Pragma: no-cache");
header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/vnd.apple.pkpass");
header('Content-Disposition: attachment; filename="abc123.pkpass"');
clearstatcache();
$filesize = filesize($pkpass_file);
if($filesize)
   header("Content-Length: ". $filesize);
header('Content-Transfer-Encoding: binary');
if (filemtime($pkpass_file)) {
   date_default_timezone_set("UTC");
   header('Last-Modified: ' . date("D, d M Y H:i:s", filemtime($pkpass_file)) . ' GMT');
}
flush();
readfile($pkpass_file);
?>


On Safari in iOS, the pkpass can be downloaded and added to Wallet successfully.

But on Chrome in iOS, it says "Sorry, your Pass cannot be installed to Passbook at this time."


A similar issue was reported at Google at https://productforums.google.com/forum/#!topic/chrome/mzoEVvqi6rs

May I know if Passes can be downloaded from Chrome in iOS and added to Apple Wallet?

Is there an official reason if it can't be done? Thanks!

I too have this issue Safari works ok but Chrome and Firefox for iOS doesn't. Were you able to find out what was causing this issue @killdurst?

@jvpersonaldev Even i have same issue.Please do let me know if anything resolved for you? Help Apprciated.Thanks in Advance!

Difficult to say – doesn’t appear to be a general issue: for me both Chrome and Firefox on iOS work fine.


Usually errors like this come from different security/trust evaluation regarding other vendors’ apps.


So first, you want to double-check:

  • you got the served file type set to application/vnd.apple.pkpass
  • you are serving the pass via flawless and direct HTTPS with a valid and verifiable certificate
  • you correctly rendered the correct certificate details into pass.json and the signing worked as it should
  • + you did not exceed the recommended image (file)sizes inside the package, which more often than not can lead to very strange error behaviour as well…


Could you post an example link right here ?

Hey @arunfrmatlanta , Have you found a solution for this problem?

Changing our request method from a POST to a GET when serving the pkpass made it possible to download the pass using Google Chrome for Mobile on an iOS device.

Hello @danahenke, Can you please share the code? We have tried it using GET as well but no luck.

Any help would be appreciated.

Can't download pkpass from Chrome in iOS
 
 
Q