DeviceToken
public indirect enum DeviceToken : Codable, Equatable, FunctionResult, TDEnum, EquatableEnum
Represents a data needed to subscribe for push notifications through registerDevice method. To use specific push notification service, you must specify the correct application platform and upload valid server authentication data at https://my.telegram.org
-
A token for Firebase Cloud Messaging
- token: Device registration token; may be empty to de-register a device
- encrypt: True, if push notifications should be additionally encrypted
Declaration
Swift
case firebaseCloudMessaging(token: String, encrypt: Bool)
-
A token for Apple Push Notification service
- deviceToken: Device token; may be empty to de-register a device
- isAppSandbox: True, if App Sandbox is enabled
Declaration
Swift
case applePush(deviceToken: String, isAppSandbox: Bool)
-
A token for Apple Push Notification service VoIP notifications
- deviceToken: Device token; may be empty to de-register a device
- isAppSandbox: True, if App Sandbox is enabled
- encrypt: True, if push notifications should be additionally encrypted
Declaration
Swift
case applePushVoIP(deviceToken: String, isAppSandbox: Bool, encrypt: Bool)
-
A token for Windows Push Notification Services
- accessToken: The access token that will be used to send notifications; may be empty to de-register a device
Declaration
Swift
case windowsPush(accessToken: String)
-
A token for Microsoft Push Notification Service
- channelUri: Push notification channel URI; may be empty to de-register a device
Declaration
Swift
case microsoftPush(channelUri: String)
-
A token for Microsoft Push Notification Service VoIP channel
- channelUri: Push notification channel URI; may be empty to de-register a device
Declaration
Swift
case microsoftPushVoIP(channelUri: String)
-
A token for web Push API
- endpoint: Absolute URL exposed by the push service where the application server can send push messages; may be empty to de-register a device
- p256dhBase64url: Base64url-encoded P-256 elliptic curve Diffie-Hellman public key
- authBase64url: Base64url-encoded authentication secret
Declaration
Swift
case webPush(endpoint: String, p256dhBase64url: String, authBase64url: String)
-
A token for Simple Push API for Firefox OS
- endpoint: Absolute URL exposed by the push service where the application server can send push messages; may be empty to de-register a device
Declaration
Swift
case simplePush(endpoint: String)
-
A token for Ubuntu Push Client service
- token: Token; may be empty to de-register a device
Declaration
Swift
case ubuntuPush(token: String)
-
A token for BlackBerry Push Service
- token: Token; may be empty to de-register a device
Declaration
Swift
case blackBerryPush(token: String)
-
A token for Tizen Push Service
- regId: Push service registration identifier; may be empty to de-register a device
Declaration
Swift
case tizenPush(regId: String)