0

Using branch.io and the iOS branch SDK, I am experiencing an issue where some parameters appending to the branch.io quick link are not being received by the iOS application. Here are the steps I have taken

1) I have defined a quick link in branch.io (https://REDACTED.app.link/rlaJz0QU5K).

2) I then created a test HTML page that uses that link, along with some query parameters.

3) For the iOS app associated with that quick link, I have integrated the branch.io SDK and followed all the instructions.

4) Depending on the query parameters added, I am seeing strange results when tapping the link (from step 2) in the mobile browser.

5) Read this SO question and attempted the solution in the accepted answer. It did not work.

If I use the link and query params below and then tap on that link in the mobile browser, the app is opened as expected, but the parameters do not seem to get passed to the iOS app correctly:

https://REDACTED.app.link/rlaJz0QU5K?username=my_name&password=my_pw&officecode=my_code

Here is the log output from the iOS app:

params: {    "+clicked_branch_link" = 0;    "+is_first_session" = 0;}

Notice that the parameters from the query string are not there. Additionally, the "Session Referring Link URL" in the Events tab of the Liveview section of the branch.io dash board says "null".

This log output is generated by implementing the sample code on branch.io's iOS Objective C SDK integration instructions:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: {
    Branch *branch = [Branch getInstance];
    [branch initSessionWithLaunchOptions:launchOptions andRegisterDeepLinkHandler:^(NSDictionary *params, NSError *error) {
    if (!error && params) {
        // 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
        // ... insert custom logic here ...
            NSLog(@"params: %@", params.description);
        }
    }];

    return TRUE;
}

Next, I changed the HTML page link to use different query parameters:

https://REDACTED.app.link/rlaJz0QU5K?param1=my_name&param2=my_pw&param3=my_code

If I tap on the link in the mobile browser, the app opens and the parameters ARE passed to the app, as seen in the log output:

params: {
    "$marketing_title" = "REDACTED";
    "$one_time_use" = 0;
    "+click_timestamp" = 1520530852;
    "+clicked_branch_link" = 1;
    "+is_first_session" = 0;
    "+match_guaranteed" = 1;
    param1 = "my_name";
    param2 = "my_pw";
    param3 = "my_code";
    "~campaign" = "REDACTED";
    "~creation_source" = 1;
    "~feature" = marketing;
    "~id" = 499944929582264883;
    "~marketing" = 1;
    "~referring_link" = "https://REDACTED.app.link/rlaJz0QU5K?param1=my_name&param2=my_pw&param3=my_code";
    "~tags" =     (
        REDACTED,
        REDACTED
    );
}

In the events tab of the Liveview section of the branch.io dashboard, I see the following under the "Session Referring Link URL" column:

https://REDACTED.app.link/rlaJz0QU5K?param1=my_name&param2=my_pw&param3=my_code

Why am I seeing this different behavior when the only difference is the name of the query string parameters? For what it's worth, I tried creating a new quick link and attempted the same thing with the same sad results.

seanicus
  • 1,141
  • 4
  • 19
  • 40

1 Answers1

0

There could be chances that there could be Branch key miss match for your app. The Branch key that is being used in the info.plist should match with the Branch key of your app through which the link was created.

For more investigation, please write in support@branch.io

  • Hi Parth... thanks for your answer. I am aware that it isn't a real link... I purposely redacted the actual link name so that I wouldn't be using the real link in my stackoverflow question. – seanicus Mar 09 '18 at 03:10
  • 1
    Hi my apologies for the reply, I had no idea for the intentions of not using a real link. I have edited my answer to provide you a solution. – Parth Kalavadia Mar 09 '18 at 17:27
  • Hi Parth... I have been in correspondence with your colleague Gene on the integrations team. If you can track down my tickets with him, you can see log data that I've sent, as well as a sample XCode project in which to reproduce this. – seanicus Mar 09 '18 at 18:47