Topics - iOS

Topics are different interests within your app that a user can subscribe to which they can then be messaged about. They can be controlled by users so that the user can customize what they receive notifications about. Example topics would be OptedIntoMarketingMessages, a list of user interests such as football teams or trends.

note

Full API documentation here

Subscribing to topics

// Subscribe to a topic
OpenBack.subscribe(toTopic: "WRTGHGES") { (error) in
}
// Subscribe to multiple topics
OpenBack.subscribe(toTopics: ["WRTGHGES", "HHTTXXVB"]) { (error) in
}

Getting the subscribed topics

// Get the list of subscribed topics
OpenBack.getSubscribedTopics { (topics) in
}
// Check if subscribed to a topic
OpenBack.isSubscribed(toTopic: "WRTGHGES") { (subscribed) in
}

Unsubscribing from topics

// Unsubscribe from a topic
OpenBack.unsubscribeFromTopic(topic: "SRHBSRCSG") { (error) in
}
// Unsubscribe from all topics
OpenBack.unsubscribeFromTopics { (error) in
}