'Add card to Wallet in Unity
I need add card to apple Wallet in Unity. For example - I am already generated pkpass file (it could storage in resources) and now I need only button in my app, what can added this card to Wallet. I have read this manual and find only code for swift:
guard let passPath = Bundle.main.path(forResource: "wallet", ofType: "pkpass") else { return }
let error: ErrorPointer = ErrorPointer(nilLiteral: ())
guard let passData = NSData(contentsOfFile: passPath) else { return }
let pass = PKPass(data: passData as Data, error: error)
let passLibrary = PKPassLibrary()
passLibrary.addPasses([pass]) { (status) in
print(passLibrary.containsPass(pass))
}
As I understood, I need implement PKPassLibrary in Unity and add this method (with some modifications) to button click event.
Could you help me with this moment, please?
The situation is difficult by the fact that I don't have a Mac and IOs device.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
