Instance Method

replacePass(with:)

Replaces a pass in the user’s pass library with the given pass.

Declaration

func replacePass(with pass: PKPass) -> Bool

Parameters

pass

The new pass.

Return Value

true if the pass was replaced successfully; otherwise, false.

Discussion

The new pass replaces the existing pass with the same pass type identifier and serial number. If there is no such pass in the user’s pass library, the replacement fails.

See Also

Adding and Removing Passes

enum PKPassLibraryAddPassesStatus

Statuses used when adding passes to the pass library.

func canAddFelicaPass() -> Bool

Returns a Boolean value that indicates whether the library can add Felica passes.

func removePass(PKPass)

Removes the pass from the user’s pass library.