4

I'm trying to implement Firebase In-App Messaging SDK within my iOS Project. I already added by project in Firebase console and created a new Campaign. I want to test if the campaign is being triggered from Firebase Console to my iOS App but when I try to publish it, I'm being told to enter my Firebase Installation ID. I followed the steps from Firebase In-App Messaging documentation wherein I should addd this argument "-FIRDebugEnabled" in schemes. But when I run the App, I'm getting this error in Xcode logs ->[Firebase/InAppMessaging][I-IAM280002] Firebase In App Messaging was not configured with FirebaseAnalytics.

Is there another way to obtain the Firebase Installation ID?
I'm using Xcode 12, Swift 5.

3 Answers3

1

Include pod 'Firebase/Analytics' in the Podfile to build Firebase Analytics into the app.

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
  • Hi, it's included already. I'm getting the mentioned error even if the Firebase Analytics pod is included. – Josh Byanec McFergan Jun 02 '21 at 03:36
  • Something about the configuration is likely off. You could debug why https://github.com/firebase/firebase-ios-sdk/blob/master/FirebaseInAppMessaging/Sources/Analytics/FIRIAMAnalyticsEventLoggerImpl.m#L72 is being hit or post a reproducible example in an issue at https://github.com/firebase/firebase-ios-sdk/issues – Paul Beusterien Jun 02 '21 at 14:01
1

In app messaging for IOS

Step 1: Add the Firebase In-App Messaging SDK to your project

Step 2: Add the Firebase installations SDK to your app

Step 3: Get firebase installation ID

Step 4: Xcode configuration to get firebase installation ID

Step 5: Go to firebase console -> messaging -> new campaign -> in-app messaging -> fill style and content -> hit Test on device button -> add Firebase installation id -> hit test button

Re-run the app again to see in app message

Prateek Jain
  • 216
  • 1
  • 6
-1

Get your app's installation ID Documentation Link

To conserve power, Firebase In-App Messaging only retrieves messages from the server once per day. That can make testing difficult, so the Firebase console allows you to specify a test device that displays messages on demand.

That testing device is determined by a Firebase installation ID provided by the Firebase installations service. To find your testing app's installation ID, run the app with the runtime command argument -FIRDebugEnabled:

  1. With your Xcode project open, select Product > Scheme > Edit scheme... from the top menu bar.
  2. Open the Arguments tab of the dialog that pops up.
  3. Click + Add items under Arguments Passed On Launch.
  4. Enter "-FIRDebugEnabled" in the newly-created field.
  5. Click Close, then run your app.

Once your app starts running, look for the following line in the Xcode console's logs:

[Firebase/InAppMessaging][I-IAM180017] Starting InAppMessaging runtime with Firebase Installation ID YOUR_INSTALLATION_ID

zstate
  • 1,995
  • 1
  • 18
  • 20