Notifications (iOS SDK)

Message Received Tracking

Method Objective

The method gives the system an understanding that a user has received the campaign message: bulk, chain, transactional.

Syntax and parameters

sdk.notificationReceived(code, type)


NameTypeRequirementDescription
codestringrequired

Unique campaign code

The "src.id" value in the "payload" of the campaign should be used to define the value for this parameter. See Payload Examples.

typestringrequired

Campaign Type

The "src.type" value in the "payload" of the campaign should be used to define the value for this parameter. See Payload Examples.

Example of use

sdk.notificationReceived(code: "i7ykuagkjgfs", type: "mobile_push_bulk")


Message Click Tracking

Method Objective

The method gives the system an understanding that the user clicked the campaign message: bulk, chain, transactional.

Syntax and parameters

sdk.notificationClicked(code, type)


NameTypeRequirementDescription
codestringrequired

Unique campaign code

The "src.id" value in the "payload" of the campaign should be used to define the value for this parameter. See Payload Examples.

typestringrequired

Campaign Type

The "src.type" value in the "payload" of the campaign should be used to define the value for this parameter. See Payload Examples.

Example of use

sdk.notificationClicked(code: "i7ykuagkjgfs", type: "mobile_push_transactional")


Token Send

Method Objective

The method allows sending an iOS push notification token to the system.

Syntax and parameters

sdk.setPushTokenNotification(token: ios_token, platform: token_platform) { (tokenResponse) in
  print("Token set response")
}
NameTypeRequirementDescription
ios_tokenstringrequired

iOS push notification token

token_platformstringoptionally

Token platform. Available values:

  • ios (default value)
  • ios_firebase (if the iOS app uses Firebase)

Example of use

sdk.setPushTokenNotification(token: "93b033a394da31b3160b8e0a35b80b6c16eb99a22ed34e88afe2a117dd4bc601", platform: "ios") { (tokenResponse) in
  print("Token set response")
}

Payloads

The Payloads structures are available under Push Payloads (Mobile SDKs).

Copyright 2018-2024 PersonaClick