Closed ismail-wun-sg closed 9 months ago
Yes, that is a common Apple Server restriction. They only allow if browser origin is Safari. The only thing you can do is force system browser to be used when user tries to download Apple pass by setting the target to "_system". It worked for me.
Sample PHP code:
echo '<a href="' . $displayFileName . '" target="_system"><img src="' . plugin_dir_url( __FILE__ ) . 'includes/add-to-apple-wallet.jpg" width="100px" /></a>';
I am having same issue while adding pass to the wallet on firefox and chrome.
I tried <a href="' . $displayFileName . '" target="_system"><img src="' . plugin_dir_url( __FILE__ ) . 'includes/add-to-apple-wallet.jpg" width="100px" /></a>
but not worked for me.
Just as an update, I'm pretty sure this no longer works in some cases on iOS 14 and beyond, since you can change the default browser app, so _system will target whatever is set as the default browser, not Safari in all cases.
Not sure this library can do anything to fix this, so I'll close the issue for now. Please suggest some ideas and we can reopen and discuss potential workarounds, if there are any.
I'm using the following code to return the pkpass to the user...
The pass can be successfully downloaded and installed to my Apple Wallet when I access the page using Safari on iOS.
But when I try to do the same on Chrome on iOS, I get the following message:
Sorry, your Pass cannot be installed to Passbook at this time.
Anyone here encountering a similar problem? Is there anything that needs to be modified in the code to handle downloading from Chrome on iOS?