Deep link is received twice in iOS in Ionic 2
See original GitHub issueHi, 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:
- Install latest Ionic CLI 2.2.1.
- Install Cordova 6.5.0.
- Create a brand new project with:
ionic start --v2 myApp tabs
. - Install branch plugin.
- Follow plugin configuration and setup.
- Build and run in an iPhone 6 with iOS 10.2.
- Kill the app.
- Generate a branch link and click on it.
- 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:
- Created 6 years ago
- Comments:14 (7 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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,
@ravi-pandit14, Make sure you have branch.initSession() in both
deviceready
andresume
. https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking#initialize-branchAdditionally, 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