Tal Zion
Tal Zion

Reputation: 6526

How to get Firebase InAppMessaging Instance ID programmatically

Is there a way to get Firebase InApp Messaging programmatically?

InstanceID.instanceID().instanceID {} // returns fcm token
Messaging.messaging().fcmToken // returns fcm token 

We can get the InApp Messaging while enabling the debug mode argument, but I wonder if this is possible to get it programatically.

Firebase InApp Messaging Docs: iOS

Upvotes: 2

Views: 2860

Answers (1)

Kévin
Kévin

Reputation: 890

You have to import FirebaseInstallations and call the following:

    Installations.installations().installationID { id, error in
        print("Id used to debug Firebase InApp Messaging: \(id)")
    }

Source

Upvotes: 7

Related Questions