user3096733 user3096733 - 6 months ago 23
iOS Question

Branch.io parameters missing when appended to an existing link

I am trying to make it so a user clicks a Branch.io link in the form

https://a.test-app.link/identifier?foo=bar

and then be redirected to the AppStore to download the app. The app should then be able to grab the
foo
parameter during launch.

To debug this I have followed this procedure:


  1. Create the link under the test environment.

  2. Tap the link on the device.

  3. Install app with Xcode.

  4. Launch the app and read the parameters during launch with

    let branch = Branch.getTestInstance()
    branch.setDebug()
    branch.initSessionWithLaunchOptions(launchOptions, andRegisterDeepLinkHandler: { params, error in
    if error == nil {
    // params are the deep linked params associated with the link that the user clicked -> was re-directed to this app
    // params will be empty if no data found
    print(params)
    }
    })



I have also set the correct API tokens in the info.plist file.

From what I understand, I should be getting by now my
foo
parameter within the
params
dictionary, but this is not happening. The only way to get parameters to work is by adding static ones using the dashboard. Furthermore, I'm even getting old parameters in the
params
dictionary that I have already removed from the dashboard, but no sign of the URL query parameters.

Does anyone have an idea of what I'm doing wrong?

Thanks

Answer

Alex from Branch.io here:

What you described is NOT the expected functionality, and I can verify on my end that this is not working correctly in the Test App configuration. I will pass this bug along to our engineers!

In the meantime, it appears that appending query params to live key links still works as expected. So if you do https://bnpo.app.link/identifier?foo=bar, foo:bar will come through.

Sorry for the inconvenience!