iOS Question Adding a pass to Apple Wallet

nwhitfield

Active Member
Licensed User
Longtime User
On my website, we have a membership card system, and the app allows people to display membership cards on screen, by requesting the card details from the server and drawing them on a canvas. Obviously that only works when you have a data connection, so I'm looking at creating a pass for Apple Wallet.

This was surprisingly straightforward, so I now have a script on the site that outputs the appropriately signed file for the user, which is called pass.pkpass.

My question is - what's the best way to handle adding this to the wallet from within my app?

SO have I have tried:

1. Using App.OpenURL to call the script. This works, in as much as when Safari gets sent the file, it allows the user to add it to the wallet. But after that, the user is left looking at a Safari window, with the little arrow top left to go back to the app UI. So, I don't consider it entirely optimal.

2. Saving the file to the documents folder, and then attempting to get it into the wallet using DocumentInteraction. Unfortunately, wallet is not listed as an option for adding the pass, and having looked at the list of UTIs for documents, there's no listed type there for Wallet Pass that I can try to use to force it.

So, have I overlooked something? How do I force the file to open in the Wallet, and have the user neatly returned to my app's UI afterwards?
 

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
You could use a SafariController. That way you could add extra buttons/ instructions around the frame.

 
Upvote 0
Top