I have saved the device token in the Backendless user class.
Now how i can send the push to that particular user , i can get the user and his device token but where do i pass it in the publish message code
let publishOptions = PublishOptions()
//publishOptions.assignHeaders(["ios-text":"Notification for iOS ",
// "android-content-title":"Notification title for Android",
// "android-content-text":"Notification text for Android"])
var error: Fault?
let messageStatus = backendless.messaging.publish("default",
message: "Work",
publishOptions:nil,
error: &error)
if error == nil {
print("MessageStatus = \(messageStatus.status) ['\(messageStatus.messageId)']")
}
else {
print("Server reported an error: \(error)")
}