0

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

Tal Zion
  • 6,308
  • 3
  • 50
  • 73

1 Answers1

5

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

Kévin
  • 850
  • 7
  • 13