How to obtain Firebase Installation ID to test Firebase In-App Messaging in iOS 13+?
Asked Answered
H

3

7

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.

Hibernicism answered 1/6, 2021 at 6:59 Comment(0)
A
3

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

Arneson answered 23/2, 2023 at 19:11 Comment(0)
D
1

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

Demimonde answered 1/6, 2021 at 22:28 Comment(2)
Hi, it's included already. I'm getting the mentioned error even if the Firebase Analytics pod is included.Hibernicism
Something about the configuration is likely off. You could debug why github.com/firebase/firebase-ios-sdk/blob/master/… is being hit or post a reproducible example in an issue at github.com/firebase/firebase-ios-sdk/issuesDemimonde
O
-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

Obel answered 15/11, 2021 at 16:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.