question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deep link is received twice in iOS in Ionic 2

See original GitHub issue

Hi, We are using Branch with the latest version of Ionic 2 (2.2.0). We have found that deep link is received twice in iOS on cold start.

How to reproduce the issue:

  1. Install latest Ionic CLI 2.2.1.
  2. Install Cordova 6.5.0.
  3. Create a brand new project with: ionic start --v2 myApp tabs.
  4. Install branch plugin.
  5. Follow plugin configuration and setup.
  6. Build and run in an iPhone 6 with iOS 10.2.
  7. Kill the app.
  8. Generate a branch link and click on it.
  9. The app starts and the link is received twice.

The expected behavior is to receive only one time the deep link.

We can provide a sample project already created and a link, too.

Regards and thanks in advance, Bea

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ethanneffcommented, Oct 17, 2017

Hello @nickpetrov,

Ionic 1 & 2 are odd as their own device event handling gets duplicated on iOS resume. This behavior is the opposite behavior from Cordova, PhoneGap, and Ionic 3.

This hotfix I pushed originally was meant to stop the double opens which were happening (causing analytical discrepancies in the Brach Dashboard).

I’ve looked into this issue again and was unable to reproduce the error. Please make sure you have updated your Branch SDK. Furthermore, you want to make sure you are using branch.initSession() to read you deep link data and not the depreciated DeepLinkHandler() method.

Thanks,

0reactions
ethanneffcommented, Mar 6, 2018

@ravi-pandit14, Make sure you have branch.initSession() in both deviceready and resume. https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking#initialize-branch

Additionally, make sure you follow the flow of a user. Deep link click -> app store -> install -> open -> read branch.initSession().

Lastly, branch.initSession() will not be called if there is a mismatch between deep link click and app open. The best way to test your configuration is by following this guide https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking#test-deep-link-ios

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deep link is received twice in iOS in Ionic 2 · Issue #304 - GitHub
Hi, We are using Branch with the latest version of Ionic 2 (2.2.0). We have found that deep link is received twice in...
Read more >
Deep link is received twice in iOS in Ionic 2 - - Bountysource
Hi, We are using Branch with the latest version of Ionic 2 (2.2.0). We have found that deep link is received twice in...
Read more >
Cordova Ionic v1 App crashes on deep linking with branch.io ...
I am using ionic v1 to build a cordova project. My app runs in android and iOS. But when I try to implement...
Read more >
Everything a developer needs to know about deep linking
A deep link is any link that routes a user to the right place in the app. How this occurs, however, can vary...
Read more >
Ionic Deeplink Plugin on iOS and Android Apps
This plugin handles deeplinks on iOS and Android for both custom URL scheme links and Universal App Links. Read Ionic's deeplinks docs for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found