Implementation
If you want to leverage the native functionality of the Wallet app, you only need to include the NotificareLoyaltyKit
dependency and nothing else. We automatically delegate incoming push notification passes to the Wallet app.
However, there might be situations where you might want to obtain a pass object to, let's say, retrieve its contents. If you know the pass serial number, or barcode, you can use the methods below to retrieve a serialized model.
Notificare.shared.loyalty().fetchPass(serial: "") { result in
}
Notificare.shared.loyalty().fetchPass(barcode: "") { result in
}
Additionally, if you need to present the fetched pass to the user, you can call the following method.
Notificare.shared.loyalty().present(pass, in: viewController)