8000 InApp message is shown every new session (timestamp of the impression record is always 0 seconds) · Issue #8907 · firebase/firebase-ios-sdk · GitHub
[go: up one dir, main page]

Skip to content

InApp message is shown every new session (timestamp of the impression record is always 0 seconds) #8907

@alien190

Description

@alien190
  • Xcode version: 13.1
  • Firebase SDK version: 8.8.0 (Flutter plugin firebase_in_app_messaging: ^0.5.0+11)
  • Installation method: CocoaPods
  • Firebase Component: InAppMessaging

The problem description:

InAppMessages are shown every new session even though the scheduling is set to 'No more than one message every day'.

2021-11-02_11-57

The problem is reasoned by incorrect timestamp of the impression record. It's always 0 seconds.
Here is the line from log:

[Firebase/InAppMessaging][I-IAM270002] Insert the first impression record for message 3223183152453255168 with timestamp in seconds as 0.000000

I think the bug is located in this line

withStartTimestampInSeconds:self.lastDisplayTime];

This code:
[self.displayBookKeeper recordNewImpressionForMessage:messageID withStartTimestampInSeconds:self.lastDisplayTime];

probably should be fixed as:

[self.displayBookKeeper recordNewImpressionForMessage:messageID withStartTimestampInSeconds: [self.timeFetcher currentTimestampInSeconds ] ];

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0