Skip to content

☄️ Implement batch sending

Compare
Choose a tag to compare
@MihaelIsaev MihaelIsaev released this 16 May 00:31
· 39 commits to master since this release
// get it from iOS/Android SDK
let token1 = "<YOUR FIREBASE DEVICE TOKEN>"
let token2 = "<YOUR FIREBASE DEVICE TOKEN>"
let token3 = "<YOUR FIREBASE DEVICE TOKEN>"
...
let token100500 = "<YOUR FIREBASE DEVICE TOKEN>"

let notification = FCMNotification(title: "Life is great! 😃", body: "Swift one love! ❤️")
let message = FCMMessage(notification: notification)
application.fcm.batchSend(message, tokens: [token1, token2, token3, ..., token100500]).map {
    print("sent!")
}