---
title: TKTokenWatcher
framework: cryptotokenkit
role: symbol
role_heading: Class
path: cryptotokenkit/tktokenwatcher
---

# TKTokenWatcher

An object that tracks the tokens available in the system.

## Declaration

```swift
class TKTokenWatcher
```

## Mentioned in

Using Cryptographic Assets Stored on a Smart Card

## Overview

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()](cryptotokenkit/tktokenwatcher/init().md)
- [init(insertionHandler:)](cryptotokenkit/tktokenwatcher/init(insertionhandler:).md)

### Accessing Token Identifiers

- [tokenIDs](cryptotokenkit/tktokenwatcher/tokenids.md)

### Configuring Handlers

- [addRemovalHandler(_:forTokenID:)](cryptotokenkit/tktokenwatcher/addremovalhandler(_:fortokenid:).md)
- [setInsertionHandler(_:)](cryptotokenkit/tktokenwatcher/setinsertionhandler(_:).md)

### Classes

- [TKTokenWatcher.TokenInfo](cryptotokenkit/tktokenwatcher/tokeninfo.md)

### Instance Methods

- [tokenInfo(forTokenID:)](cryptotokenkit/tktokenwatcher/tokeninfo(fortokenid:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Tokens

- [TKTokenDriver](cryptotokenkit/tktokendriver.md)
- [TKToken](cryptotokenkit/tktoken.md)
- [TKTokenSession](cryptotokenkit/tktokensession.md)
