---
title: pushToken
framework: accessorytransportextension
role: symbol
role_heading: Instance Property
path: accessorytransportextension/accessorytransportsession/pushtoken
---

# pushToken

A token that identifies the iOS device to the Apple Push Notification service for routing accessory responses over the internet.

## Declaration

```swift
var pushToken: Data?
```

## Discussion

Discussion This property contains a value when the session uses internet transport. Convert the token to a hex-encoded string before including it in the JSON payload your accessory sends to your server. Your server uses the token to contact APNs and route the accessory’s encrypted response to the correct device; include the sessionID in the same payload so the system delivers the response to the correct data provider extension.

## See Also

### Determining the communication method

- [transport](accessorytransportextension/accessorytransportsession/transport.md)
- [transportStateRestoreIdentifier](accessorytransportextension/accessorytransportsession/transportstaterestoreidentifier.md)
