node.jspassbook

Safari is throwing a error while downloading .pkpass


I have a web-server with node.js backend, which builds up a .pkpass files (certified and everything is ok).

In pass.json webServiceURL = 'addressToBackEndpoint' for pass update and a authenticationToken (just a random 32 letters).

When I try to install produced pass to walletpasses (on android), it works just fine with no errors. But downloading the same pass from same URL on IPhone brings me a error from safari

Download Failed - Safari cannot download this file.

No logs, no way to find out whats is wrong. PkPassValidator says that there is no issue found in this pass.

Any ideas whats wrong and how to make it work?


Solution

  • Solved:

    After taking a closer look at pass.json, found out that 'o' letter in url (was copied and pasted into pass.json) was in another encoding (while looking pretty similar)

    To make sure that everything is okay you may use some encoding valitators.

    Tip: with apple its better not to play a lottery but to install an iOS simulator from mac os (in my case Mac OS in VMWare), then launch a simulator with a MAC console(not phone's), then search for 'pass' logs at connected device