1

I am trying to understand how to work with apple passes whilst using localhost. I am using Android Usb debugging so I can visit my website served on localhost from my phone. I have also setup the signing, compressing and installation of the passes.

What I don't understand, is how to debug communications between the installed pass and my server. I don't seem to be receiving requests from the pass once it is installed. Is this because I am using localhost? I inserted localhost as the web service in the pass.json file used to generate the file. My problem is understanding how to debug the problem as I am getting no feedback to work on.

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158

1 Answers1

0

Localhost won't work as the device will view localhost as itself, not as your computer.

To work locally:

  • connect your phone and computer to the same wireless network
  • allow http in the developer menu of your iPhone (otherwise the pass will be rejected for not having a https webServiceURL)
  • use http://computerIp:8080/ as the webServiceURL
  • serve your web service on your computer on port 8080

For feedback you can view your device logs in Xcode or in the OSX Console application.

PassKit
  • 12,231
  • 5
  • 57
  • 75
  • 1
    Thanks a lot for your quick reply. I managed to solve the problem. Localhost wasn't a problem as I have connected my phone via usb debugging. The problem was I hadn't formatted the url properly in the backend and was overthinking the problem. Thanks again for the quick response and hopefully this answer can be of use to someone in the future. – Simone Neil-Jones Non Oct 10 '19 at 16:31