What is the difference between deviceToken of type Data and token Fir InstanceID of type optional string in Swift - IOS?

I am new to Firebase Cloud Messaging and push notifications.

When we register for push notifications, this method is called

    func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)
    {
        // deviceToken is received
    }

and then, to send a push notification, we use this line of code to get a token:

    let myToken = FIRInstanceID.instanceID().token()!

Now I want to ask, what is the difference between these tokens?

+4
source share
1 answer

Instance ID:

API- Android iOS-. , Google Cloud Messaging.

:

Apple Push iOS. Apple (iOS 7 ), push-. : ( ad hoc app store). 64 .

+2

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


All Articles