Class

PKAddPassesViewController

Lets your app show a pass and prompt the user to add that pass to the pass library.

Declaration

class PKAddPassesViewController : UIViewController

Overview

To add multiple passes without presenting this view controller multiple times, use the addPasses(_:withCompletionHandler:) method of PKPassLibrary.

Topics

Determining if Passes Can Be Added

class func canAddPasses() -> Bool

Returns whether the device supports adding passes.

Adding Passes

var delegate: PKAddPassesViewControllerDelegate?

The view controller’s delegate.

protocol PKAddPassesViewControllerDelegate

Methods that an add-passes view controller’s delegate implements.

Creating an Add-Passes View Controller

init?(pass: PKPass)

Initializes and returns a newly created add-passes view controller with a single pass.

init?(passes: [PKPass])

Initializes and returns a newly created add-passes view controller with an array of passes.

See Also

Wallet Availability

class PKAddPaymentPassViewController

Displays an interface that lets users add cards to Apple Pay from within your app.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software