IOS - Push Notification with Layer.com

I am trying to send a notification using the Layer API:

let text = "Hello world" 
var error: NSError?

let part = LYRMessagePart(text: text) 
let message = layerClient.newMessageWithParts([part], options: [LYRMessageOptionsPushNotificationAlertKey : text], error: &error) 
self.layerConversation = getLayerConversation() 
self.layerConversation.sendMessage(message, error: &error)

Everything works well the first time I logged in - there is a push message and a message in the layers log, but after that, when I try to push another notification, there is no push, just a message? How can i fix this?

+4
source share

Source: https://habr.com/ru/post/1608946/


All Articles