-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deep link is received twice in iOS in Ionic 2 #304
Comments
Hello bea91, Thank you for bring this to our attention and giving us the steps to reproduce it. We will look into this tomorrow and report back any information/solutions we can find. Thanks, |
Hello again, I apologize for the delay. The good news is the duplicate data return on app terminate has been fixed. Please do the following to remove the Branch SDK and update it to the latest version ( cordova plugin rm branch-cordova-sdk
cordova build ios Thank you for your patience and thank you for the steps to reproduce this issue. Best, |
Thank you so much!. After upgrading Branch plugin to the latest version, all is working fine as expected again. Regards, |
Hi, |
Hello, I am reopening this issue and will investigate further. I have a feeling one of our underlying SDKs (Android and iOS) could be queuing the network requests whenever you try opening the app without an internet connection. Once you finally open the app with an internet connection, you get the queue of all the previous request data. This is my assumption which I will investigate. In the meantime, can you confirm your testing process is the same? Additionally, can you confirm the data you are receiving twice is the same? This will help me pinpoint the exact issue you are experiencing. Thanks, |
Hi, We have tested again the issue and we found out that branch init session call after the resume event was the problem. As it is said in the documentation of Ionic 2/3 we have implemented branch init session after resume event like this: If branch init session is called after the resume event, deep links are received twice. After removing branch init session after resume event, deep links are received only once in background. So now is not needed to init session again after resume event. Can you please confirm this, and update the documentation? Thanks in advance. We have tested also without internet connection. In these case, requests are not queued. Best regards, |
Hello, Thanks for following up on this. I rebuilt our internal testing app for Ionic 2 and 3 and created some small sample apps. However, no one on my team is able to replicate the double deep link data on iOS. The reason why we recommend our partners include the following is because deep link data will not pass through on Android whenever the app is background. platform.resume.subscribe(() => {
branchInit();
}); You can probably contain do the following to prevent your use case of double deep link data on iOS. platform.resume.subscribe(() => {
if (platform.is('android')) {
branchInit();
}
}); In the meantime, we will keep an eye out for any others reporting this issue. Thanks, |
Hello, We have our iOS app. And I can link our app from our online site in chrome. But when i run the app again, the branch api returns the same params when it deep linked. I guess this is one of the problem that is mentioned in this thread. Do you have any solution? Edited: Also i noticed that the handler method getting called twice in some cases. In that case too, the "_branch_match_id" is missing in the first and the second time they are sending the full keys. @ethanneff - Did you notice this kind of thing any time? Thanks |
Hello @pallaviashim, I pushed a fix yesterday ( |
Sorry. I didnt mention, i am using branch api for native iOS. :-/ . |
@ethanneff Hey. Just re-checked data and the hotfix you've implemented. This doesn't solve the issue. NOTE: this bug only happens on a cold start. if the app is already running in background - deeplinks handler fired only once, as expected. |
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 Thanks, |
@ethanneff , initsession() did not fire when app is installed from app store. In ionic cordova build ios command xcode deploy on mobile its running fine. what is the problem?? |
@ravi-pandit14, Make sure you have branch.initSession() in both 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 |
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:
ionic start --v2 myApp tabs
.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
The text was updated successfully, but these errors were encountered: