Skip to content

In-App Messaging's test message does not include appData in response (and also not in InAppMessagingDisplayMessage ) #9126

Closed
@fumito-ito

Description

@fumito-ito

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 13.2.1
  • Firebase SDK version: 8.4.0
  • Installation method: Swift Package Manager
  • Firebase Component: In-App Messaging
  • Target platform(s): iOS

[REQUIRED] Step 2: Describe the problem

In-App Messaging' message has appData property. But it looks always nil for test message.

Steps to reproduce:

  1. Make an App to receive In-App Messaging
  2. Create and send Test message from Firebase Console
  3. Set a break point at displayMessage(:displayDelegate:) in 1.'s App and run the App in Debug mode
  4. See messageForDisplay.appData in debug console. It shows nil.

Relevant Code:

There are two causes of this problem.

1. FIRIAMFetchResponseParser always ignores appData for test message

if (isTestMessage) {
return [[FIRIAMMessageDefinition alloc] initTestMessageWithRenderData:renderData
experimentPayload:experimentPayload];
} else {
return [[FIRIAMMessageDefinition alloc] initWithRenderData:renderData
startTime:startTimeInSeconds
endTime:endTimeInSeconds
triggerDefinition:triggersDefinition
appData:dataBundle
experimentPayload:experimentPayload
isTestMessage:NO];

In this code, FIRIAMFetchResponseParser looks ignore appData for test message.

2. In-App Messaging's response does not contain appData property for test message.

NSDictionary *responseDict = [NSJSONSerialization JSONObjectWithData:data
options:kNilOptions
error:&errorJson];

I found that appData also does not be included in responseDict for test message. It looks happened every time for test message.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions