Skip to content

Some sort of cache for In App Message triggers #111

@keoztiryaki

Description

@keoztiryaki

Hello,

In my app, I have 2 screens, Completed Orders and Earnings. Each of these screens have triggers when they are opened. On ViewDidAppear, I set either
OneSignal.InAppMessages.addTrigger("screen", withValue: "completed_orders")
or
OneSignal.InAppMessages.addTrigger("screen", withValue: "earnings")

I create a new In-App Message from OneSignal dashboard with trigger screen=completed_orders and I set "show when triggers are met" and "show every time when trigger conditions are satisfied". I open the app. Go to completed orders screen and voila. It works.

Now I pause this In-App Message from OneSignal dashboard. This time, I create another In-App Message with screen=earnings with the same settings. Then in the app, I go to that screen. Nothing happens. I see in the log VERBOSE: Evaluating in app messages but no payload is received. And then I open completed orders screen again, and previous In-App Message which I paused is still shown.

I waited few minutes to see if there is some sort of cache. Nothing happened. If I kill the app and then re-open it, then it no longer shows In-App Message in completed orders screen and it started to show in earnings screen.

Why is this working like that? We shouldn't force users to kill the app for new settings to take effect.

We are using v5.2.9 latest version of SDK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions