iOS中的Firebase云消息传递问题?

时间:2017-12-15 08:55:47

标签: ios swift xcode firebase

我开始为iOS集成firbase云消息。我读了这篇文章来实现FCM。

https://firebase.google.com/docs/cloud-messaging/ios/client

我一直在关注这个文档来实现FCM,但不知怎的,我无法访问几个方法&类实例。

Messaging.messaging().delegate = self //No such class Messaging

可以在协议中找到如下所述的方法

func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String) {
  print("Firebase registration token: \(fcmToken)")

  // TODO: If necessary send token to application server.
  // Note: This callback is fired at each app startup and whenever a new token is generated.
}

所以请告诉我这里做错了什么。

1 个答案:

答案 0 :(得分:0)

试试This.For Swift

SELECT report_id, computer_id, date_entered
FROM reports
WHERE date_entered = (
    SELECT date_entered 
    FROM reports 
    ORDER date_entered 
    DESC LIMIT 1
)
相关问题