TCGBPush Class Reference

Inherits from NSObject
Declared in TCGBPush.h

Overview

The TCGBPush class provides registering push token API to ToastCloud Push Server and querying push token API.

+ registerPushWithPushConfiguration:completion:

Register push token to ToastCloud Push Server.

+ (void)registerPushWithPushConfiguration:(nullable TCGBPushConfiguration *)configuration completion:(nullable void ( ^ ) ( TCGBError *error ))completion

Parameters

configuration

The configuration which has pushEnabled, ADAgreement and AdAgreementNight.

completion

callback

Availability

Added 1.4.0.

Declared In

TCGBPush.h

+ registerPushWithPushConfiguration:notificationOptions:completion:

Register push token to ToastCloud Push Server.

+ (void)registerPushWithPushConfiguration:(nullable TCGBPushConfiguration *)configuration notificationOptions:(nullable TCGBNotificationOptions *)notificationOptions completion:(nullable void ( ^ ) ( TCGBError *error ))completion

Parameters

configuration

The configuration which has pushEnabled, ADAgreement and AdAgreementNight.

notificationOptions

The notificationOptions which has foregroundEnabled, badgeEnabled, soundEnabled.

completion

callback

Availability

Added 2.15.0.

Declared In

TCGBPush.h

+ queryPushWithCompletion:

Query push token to ToastCloud Push Server.

+ (void)queryPushWithCompletion:(void ( ^ ) ( TCGBPushConfiguration *configuration , TCGBError *error ))completion

Parameters

completion

callback, this callback has TCGBPushConfiguration information.

Availability

Added 1.4.0.

Declared In

TCGBPush.h

+ queryTokenInfoWithCompletion:

Query push token information to ToastCloud Push Server.

+ (void)queryTokenInfoWithCompletion:(void ( ^ ) ( TCGBPushTokenInfo *tokenInfo , TCGBError *error ))completion

Parameters

completion

callback, this callback has TCGBPushTokenInfo information.

Availability

Added 2.15.0.

Declared In

TCGBPush.h

+ setSandboxMode:

Set SandboxMode.

+ (void)setSandboxMode:(BOOL)isSandbox

Parameters

isSandbox

YES if application is on the sandbox mode.

Availability

Added 1.4.0.

Declared In

TCGBPush.h

+ notificationOptions

Get notificationOptions.

+ (nullable TCGBNotificationOptions *)notificationOptions

Availability

Added 2.15.0.

Declared In

TCGBPush.h