---
title: "pushToken(for:)"
framework: pushkit
role: symbol
role_heading: Instance Method
path: "pushkit/pkpushregistry/pushtoken(for:)"
---

# pushToken(for:)

Retrieves the locally cached push token for the specified push type.

## Declaration

```swift
func pushToken(for type: PKPushType) -> Data?
```

## Parameters

- `type`: A push type requested by this push registry object. For a list of possible types, see doc://com.apple.pushkit/documentation/PushKit/PKPushType.

## Return Value

Return Value The push token used to send pushes to the device or nil if no token is available for the specified type. Discussion If registration for a specific push type is successful, the push registry delivers the corresponding push token to its delegate and adds a copy of the token to its local cache. Use this method to retrieve the token at a later time.

## See Also

### Managing the Push Registry

- [desiredPushTypes](pushkit/pkpushregistry/desiredpushtypes.md)
