ios10, Swift 3 and Firebase Push Notifications (FCM)

后端 未结 3 1525
温柔的废话
温柔的废话 2020-12-17 03:20

I am struggling to display my push notifications that I am sending to my device from the FCM notification console. I can see the device is receiving the notification becaus

3条回答
  •  没有蜡笔的小新
    2020-12-17 04:08

    Inside method didRegisterForRemoteNotificationsWithDeviceToken, add the following code:

    func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
        let tokenChars = UnsafePointer(deviceToken.bytes)
        var tokenString = ""
    
        for i in 0..

    And do not forget to enable Push Notifications inside Capabilities.

提交回复
热议问题