---
title: TKTokenDriver
framework: cryptotokenkit
role: symbol
role_heading: Class
path: cryptotokenkit/tktokendriver
---

# TKTokenDriver

A base class for building token drivers.

## Declaration

```swift
class TKTokenDriver
```

## Overview

Overview When using the TKTokenDriver class, implement the TKTokenDriverDelegate protocol with the tokenDriver(_:tokenFor:) method, which the system invokes when it requests the creation of a token instance. After you create the token driver, it can examine keychainItems and configurationData to implement your desired functionality. An implementation can also access its associated token configuration using the TKToken.Configuration property. note: When working with smart card tokens, use or inherit from the TKSmartCardTokenDriver subclass instead.

## Topics

### Responding to Token Creation

- [delegate](cryptotokenkit/tktokendriver/delegate.md)
- [TKTokenDriverDelegate](cryptotokenkit/tktokendriverdelegate.md)
- [TKTokenDriver.ClassID](cryptotokenkit/tktokendriver/classid.md)
- [TKTokenDriver.Configuration](cryptotokenkit/tktokendriver/configuration.md)

## Relationships

### Inherits From

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

### Inherited By

- [TKSmartCardTokenDriver](cryptotokenkit/tksmartcardtokendriver.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

- [TKTokenWatcher](cryptotokenkit/tktokenwatcher.md)
- [TKToken](cryptotokenkit/tktoken.md)
- [TKTokenSession](cryptotokenkit/tktokensession.md)
