Open link when user scans my pass in Passbook

77 views Asked by At

Is it possibile to open a predefined link in Safari when the user scans a pass generated by my app with PassKit? I couldn't find this in the official documentation. Any hints?

There doesn't seem to be a renference to this in here: https://developer.apple.com/library/archive/documentation/UserExperience/Reference/PassKit_Bundle/Chapters/LowerLevel.html

1

There are 1 answers

0
Tom Harrington On BEST ANSWER

If a pass contains a bar code of some kind, including QR codes, they can contain whatever information you want. What happens when someone scans the code depends on what the information is and on what app they're using when they scan the code.

Wallet.app can scan bar codes, but the only thing it knows how to do when it scans a code is to try to add a new card to itself. It won't redirect to Safari, it will just try to find a pass at the URL and download one if possible.

For other apps, it depends on what scanning app the person uses. For a bar code that contains a URL, any app that I've tried would offer to open the link in Safari. But what actually happens depends on the app the person is using.