pushToken(for:)
Retrieves the locally cached push token for the specified push type.
Declaration
func pushToken(for type: PKPushType) -> Data?Parameters
- type:
A push type requested by this push registry object. For a list of possible types, see Pkpushtype.
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.