An object that tracks the tokens available in the system.


class TKTokenWatcher : NSObject


Create a token watcher and register an insertion handler to be notified when tokens are added to the system. You can also add removal handlers for specific tokens to be notified when those tokens are removed from the system.


Creating Token Watchers


Initializes a token watcher.

init(insertionHandler: (String) -> Void)

Initializes a token watcher with the specified insertion handler.


Accessing Token Identifiers

var tokenIDs: [String]

The token IDs currently available in the system.

Configuring Handlers

func addRemovalHandler((String) -> Void, forTokenID: String)

Adds a removal handler for the specified token ID.

func setInsertionHandler((String) -> Void)

Sets an insertion handler closure to be called when a new token is inserted into the system.


Inherits From

Conforms To

See Also

First Steps

Using Cryptographic Assets Stored on a Smart Card

Access certificates, keys, and identities stored on a smart card as if they were part of the keychain.