Skip to content

setBranchViewData only works once #846

@Ryanjso

Description

@Ryanjso

Describe the bug

I'm having a bug setting data on a branch journey. The setBranchViewData appears to only actually set the data the first time it is called.

Steps to reproduce

  1. When a user navigated to a different page (react navigation) I call
console.log('I get called every time the page changes, confirmed')
branch.setBranchViewData({
            data: {
                $deeplink_path: deeplinkPath,
            },
        })
  1. when someone clicks the CTA in the journey, I read the journey_link_data and the $deeplink_path is always the first one I set, and this is apparent when it opens my iOS app and sends me to the first page I had set in the web app.

Expected Behavior

The branch journey data should be updated every time I call setBranchViewData.

Additional Information/Context

No response

SDK version used (window.branch.sdk)

^2.71.0

Environment

chrome ios

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions