@interface TeakNotification

Schedule notifications for the current player or other players to be delivered sometime in the future.

Static Methods

+ scheduleNotificationForCreative:secondsFromNow:personalizationData:

Schedule a notification for this user at a time in the future.

+ (TeakOperation *)scheduleNotificationForCreative:(NSString *)creativeId
                                    secondsFromNow:(int64_t)delay
                               personalizationData:(NSDictionary *)personalizationData;

Parameters

Name Description

creativeId

The identifier of the notification in the Teak dashboard (will create if not found).

delay

The delay in seconds from now to send the notification.

personalizationData

Optional dictionary of addiontal information which can be used for templating.

+ scheduleNotificationForCreative:withMessage:secondsFromNow:

Use scheduleNotificationForCreative:secondsFromNow:personalizationData: instead

Schedule a notification for this user at a time in the future.

+ (TeakNotification *)scheduleNotificationForCreative:(NSString *)creativeId
                                          withMessage:(NSString *)message
                                       secondsFromNow:(int64_t)delay;

Parameters

Name Description

creativeId

The identifier of the notification in the Teak dashboard (will create if not found).

message

The default message to send, may be over-ridden in the dashboard.

delay

The delay in seconds from now to send the notification.

+ scheduleNotificationForCreative:secondsFromNow:forUserIds:

Schedules a push notification, to be delivered to other users, for some time in the future.

+ (TeakNotification *)scheduleNotificationForCreative:(NSString *)creativeId
                                       secondsFromNow:(int64_t)delay
                                           forUserIds:(NSArray *)userIds;

Parameters

Name Description

creativeId

The identifier of the notification in the Teak dashboard, this must already exist.

delay

The delay in seconds from now to send the notification.

userIds

A list of game-assigned user ids to deliver the notification to.

+ cancelScheduledNotification:

Cancel a previously scheduled push notification.

+ (TeakNotification *)cancelScheduledNotification:(NSString *)scheduleId;

Parameters

Name Description

scheduleId

The schedule id of the notification to cancel.

+ cancelAll

Cancel all scheduled notifications.

+ (TeakNotification *)cancelAll;

Properties

Name Type Description Access

teakNotifId

NSString *

The identifier for the scheduled notification.

Get

status

NSString *

The status of the notification operation.

Get

teakRewardId

NSString *

The identifier for the TeakReward attached to the notification, or nil.

Get

teakScheduleName

NSString *

The name of the schedule, from the Teak dashboard, or nil.

Get

teakScheduleId

NSString *

The id of the schedule, from the Teak dashboard, or nil.

Get

teakCreativeName

NSString *

The name of the creative, from the Teak dashboard, or nil.

Get

teakCreativeId

NSString *

The id of the creative, from the Teak dashboard, or nil.

Get

teakChannelName

NSString *

The channel name, from the Teak dashboard, or nil.

Get

originalJson

NSDictionary *

The original JSON blob, as an NSDictionary, used to create this structure, or nil.

Get

teakDeepLink

NSString *

The deep link associated with this notification, or nil.

Get

teakOptOutCategory

NSString *

The marketing channel for the Teak notification.

Get

showInForeground

BOOL

YES if this notification will be shown when the game is in the foreground.

Get

completed

BOOL

YES if the notification operation has completed.

Get