I'm working on an app that offers the functionality of adding a Price Card to wallet (just adding, no specific entitlements for updating or removing a passbook). The workflow from my app is the following:
- Present the price card screen where I have an
button (Don't confuse it with the specificAdd to wallet
Add to Apple Wallet
).PKAddPassButton
- Press the
button. This get's the pass package data from myAdd to wallet
API
- Build a
based on that data and present aPKPass
that enables the user to add/cancel the price card to thePKAddPassesViewController
.wallet
I've followed the guidelines from https://developer.apple.com/wallet/Add-to-Apple-Wallet-Guidelines.pdf but they seem a bit confusing to me.My feeling is that there are two possibilities of adding a
passbook
: - Add a
button using theAdd to Apple Wallet
class and by tapping on it you add thePKAddPassButton
directly. (By using this method you are forced to follow the providedpassbook
layout for theApple
). By the way I tried modifying the standardPKAddPassButton
button size but the layout just gets messed up.Add to Apple Wallet
- Get your passbook data, init a
with it and present aPKPass
that can Add/Cancel.PKAddPassesViewController
My question is if I'm supposed to use an instance of the provided
PKAddPassButton
for my Add to wallet
button (NOT the specific Add to Apple Wallet
PKAddPassButton
) or am I allowed to use whatever design i please being that the actual adding process is handled by the PKAddPassesViewController
?Another thing is that by using the PKAddPassButton the size is huge and doesn't go well with my layout. Can i create my own custom button by using the svg asset from https://developer.apple.com/wallet/ (btw the only available svg is for the two lines button please check https://forums.developer.apple.com/message/228903#228903) ?