React-native-branch-deep-linking-attribution: IOS unable to get params

Created on 23 Feb 2018  Â·  23Comments  Â·  Source: BranchMetrics/react-native-branch-deep-linking-attribution

I am not receiving params in ios. The only thing i am getting is "+non_branch_link" param, i am not getting the extra data passed with that deep linking url. Android it works fine

I am using branch 2.2.4
React native : 0.48

Most helpful comment

I've found solution. In my case I changed useTestInstance to false in myProject/branch.json. Hope it's helpful for somebody.

All 23 comments

Yea me too... it works before....

im using
"react-native": "0.47.2",
"react-native-branch": "^2.1.1"

We are trying to look into this to find a solution for this. will update soon

Just here to say I am experiencing a similar issue on react-native 0.52.2:

A specific link is not passing in data to the callback of branch.subscribe. This was working previously, however it now fails to work across different versions of the library (2.2.4, 2.1.1, & 2.0.0 all on iOS), which makes me think something may be wrong with the link itself. I have other links that were generated more recently which pass in the full set of data as expected.

(FWIW I also filed a general support ticket with Branch, just covering all the possible outlets I can here)

The deeplink does LAUNCH the app as expected - I tested it from the iOS Gmail client and from the native Messages app, both with the same result of no additional data coming in for that specific link.

Here's what the data object looks like when it comes through sans data:

{
  "error": null,
  "params": {
    "+clicked_branch_link": false,
    "+is_first_session": false
  },
  "uri": null
}

@gmeluski - same with react-native-cli: 2.0.1, react-native: 0.50.4, branch 2.1.1...tested on ios. The link only shows up as a non-branch link. Manually creating the link in the branch dashboard seems to work though.

does anyone have an idea on how to manually unwrap the link?

edit - @sequoiaat - sorry, didn't see you were on it.

Hello,
Did you tried it in latest version? Can you send me the non branch link with parameters which you are trying to pass?

@sequoiaat : example link: https://mza9.app.link/Q7ZvjhpkMK trying to access 'token' param from Data. Tried using the latest version...maybe I'm trying to access incorrectly? expected example

Data: { “~campaign”: “email”, “~creation_source”: 0, “token”: “8b3c0f84-2bf3-459f-8e2b-230f5f7bb634”, “~channel”: “email”, “~id”: “510562126033827162”, “app_action”: “reset_password”, “+url”: “https://mza9.app.link/Q7ZvjhpkMK”, “email”: “[email protected]”, “$one_time_use”: false }

Can you please try using customMetadata while creating BUO -https://github.com/BranchMetrics/react-native-branch-deep-linking#create-branch-universal-object

For example,
this.buo = await branch.createBranchUniversalObject("abc/" + this.props.navigation.state.params.title,
{
locallyIndex: true,
canonicalUrl: this.props.navigation.state.params.url,
title: this.props.navigation.state.params.title,
contentImageUrl: this.props.navigation.state.params.image,
contentMetadata: {
customMetadata: {
token: '8b3c0f84-2bf3-459f-8e2b-230f5f7bb634',
app_action: 'reset_password',
email: '[email protected]'
}
}
})

Thanks,

my links are generated via curl https://docs.branch.io/pages/apps/api/#link, is this not supported?

It should work. let us look into and revert back in few hours

thanks,
this is the command we are using:

curl -XPOST https://api.branch.io/v1/url \ -d '{ "branch_key": "key_test_", "channel": "email", "campaign": "email", "data": { "token": "token", "email": "[email protected]", "app_action": "reset_password" } }'

based on your suggestion:
curl -XPOST https://api.branch.io/v1/url \ -d '{ "branch_key": "key_test_", "channel": "email", "campaign": "email", "customMetadata":{ "customMetadata": { "token": "token", "email": "[email protected]", "app_action": "reset_password" } } }'

example link: https://mza9.test-app.link/KnTwtvpbBM

both return the same object
{+clicked_branch_link: false, +is_first_session: false, +non_branch_link: "https://mza9.app.link/Q7ZvjhpkMK"} +clicked_branch_link : false +is_first_session : false +non_branch_link : "https://mza9.app.link/Q7ZvjhpkMK" __proto__ : Object

IOS dont work.

Already using the latest version "react-native-branch": "^2.2.5"
Click link from browser, open with app, App opened. but, Here is my result from branchio
no param at all.

screen shot 2018-05-04 at 1 46 35 pm

Here is my code, i put on AppNavigator

screen-shot-2018-05-04-at-1 40 05-pm

Android works.

screen shot 2018-05-04 at 2 43 37 pm

@njculpin

Can you try to give the token as custom object and see if it works . Please see to the attached code snippet below -

curl -XPOST https://api.branch.io/v1/url \
-d '{
"branch_key": "enter your branch key here",
"channel": "facebook",
"data": {
"$canonical_identifier": "content/123",
"$og_title": "Title from Deep Link",
"$og_description": "Description from Deep Link",
"custom_boolean": true,
"custom_integer": 1243,
"custom_string": "everything",
"custom_array": [1,2,3,4,5,6],
"custom_object": {
"token": "token",
"email": "[email protected]",
"app_action": "reset_password"
}
}
}

Please refer to - https://docs.branch.io/pages/apps/api/#link

@blastering66

I hope you are using the following documentation to create the link - https://docs.branch.io/pages/links/integrate/

We will try to replicate the issue to give a solution to this. Meanwhile many times a typo in the link can also throw up such errors.

@sequoiaat - Copied your exact curl which is very similar to our original.
So it seems that its an issue with Test Versus Live Keys...I can get around that.
Test Key - Fails for both Android & iOS. Returns the same non-branch object that @blastering66 posted on both platforms.
Live Key - Passes.

thank for you help!

@sequoiaat i dont think its typo.. cuz on android it works. it work before in iOS but after a few updates on this repo release, it wont work anymore.

i already update the version to the current release, but still not get the params on ios device & ios emulator

Any updates on this issue? I'm also experiencing the problem after creating links via the web dashboard. I'm not getting any parameters, nor do the branch links appear to be recognized as branch links in my RN app

The same issue. Android works fine, but on ios got this:
'Subscribe params', { '+non_branch_link': 'https://XXXXXX.app.link/XXXXXXX',
'+is_first_session': false,
'+clicked_branch_link': false }
Link is correct. Can you give any advices how to find a reason?

I've found solution. In my case I changed useTestInstance to false in myProject/branch.json. Hope it's helpful for somebody.

Yup, same for me. I was using the live instance with test links

We are closing it, please re-open if you are facing any issue.
Also passing sensitive keys like "Token" are blocked, and won't return deep link data (we don't want to be liable to store PII).

For me the solution doesn't work. I've set to false, and still not getting data.

The problem was that I didn't create the branch.debug.json. Now it's ok.

But i am still facing the same issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

felixchan picture felixchan  Â·  5Comments

RobertoNegro picture RobertoNegro  Â·  4Comments

rickardinho picture rickardinho  Â·  4Comments

terreb picture terreb  Â·  4Comments

jandrell-formoso picture jandrell-formoso  Â·  4Comments