Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/120.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Firebase PushNotification如何与iOS APN配合使用完整说明?_Ios_Swift_Firebase_Push Notification_Apple Push Notifications - Fatal编程技术网

Firebase PushNotification如何与iOS APN配合使用完整说明?

Firebase PushNotification如何与iOS APN配合使用完整说明?,ios,swift,firebase,push-notification,apple-push-notifications,Ios,Swift,Firebase,Push Notification,Apple Push Notifications,Firebase PushNotification如何与iOS和APN配合使用。我混淆了deviceToken和fcm令牌。 其中,设备令牌由AppDelegate I中的方法给出,即 func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { print("deviceToken::::",deviceT

Firebase PushNotification如何与iOS和APN配合使用。我混淆了deviceToken和fcm令牌。 其中,设备令牌由AppDelegate I中的方法给出,即


func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
        print("deviceToken::::",deviceToken)
    }

fcm令牌是通过一种

import FirebaseMessaging

class AppDelegate: UIResponder, UIApplicationDelegate, MessagingDelegate {

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

    }

}
那么,这两种代币的用途是什么?我想知道Firebase推送通知背后的流程和机制

还有这个didRefreshRegistrationToken方法的用途是什么

 func messaging(_ messaging: Messaging, didRefreshRegistrationToken fcmToken: String) {
      print("fcmToken::::",fcmToken)
    }

请帮助我深刻理解这一点。从开始到结束的过程和机制。

在此之前2分钟,人们问了几乎相同的问题。有人应该把这个标记为重复的,我没有特权。@faris97:谢谢你的标记。在这种情况下,一个链接将非常有用。@FrankvanPuffelen,谢谢!乍一看,这似乎是一个完全不同的问题,只是碰巧是关于iOS上的FCM。所以我不会把它作为一个复制品来结束,尽管其他人当然也会投票。