Class

TKTokenWatcher

An object that tracks the tokens available in the system.

Declaration

class TKTokenWatcher : NSObject

Overview

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.

Topics

Creating Token Watchers

init()

Initializes a token watcher.

init(insertionHandler: (String) -> Void)

Initializes a token watcher with the specified insertion handler.

Deprecated

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.

Relationships

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.

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