In my iOS project I have a screen which allows the user to create apple passes and add it to the wallet. Apple recommends creating "Add to apple wallet" button using PKAddPassButton. When I tried creating apple pass using following code:
let passButton = PKAddPassButton(addPassButtonStyle: PKAddPassButtonStyle.black)
passButton.frame = CGRect(x:45.0, y: 340.0, width: 320, height: 50)
view.addSubview(passButton)
Button has got couple of issues:
Should I use some custom UIButton to achieve this? Any help is appreciated.
I found the answer, I was testing the code on simulator.When tested the same on device it worked and also localisation is taken care by iOS. If the user changes device language in settings it directly gets reflected in "Add to Apple wallet button".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With