BranchMetrics / ios-branch-deep-linking-attribution

The Branch iOS SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more.
https://help.branch.io/developers-hub/docs/ios-sdk-overview
MIT License
728 stars 229 forks source link

Share with Telegram or Skype causes deep linking behaviour when resuming app #302

Closed teodora92 closed 8 years ago

teodora92 commented 8 years ago

iOS version: 9.2.1

Production environment: debug and release

Steps to reproduce:

  1. create a BranchUniversalObject
  2. call the showShareSheetWithLinkProperties method of the universal object
  3. share with the Telegram or Skype applications
  4. Open the link from Telegram or Skype. As per the documentation, these links will not work with iOS 9.2.1 due to the fact that the applications do not support universal links yet. The links will revert to the default behaviour of forwarding to the App Store link.
  5. When resuming the application now, however, the application will act as if the deep link has been pressed.
  6. The callback method of the Branch instance is called with the data of the universal object that was previously shared and has the +clicked_branch_link property set to true/1

This behaviour seems to appear only when sharing to applications that do not support Universal Links, such as Telegram and Skype.

ahmednawar commented 8 years ago

@teodora92 thanks for sending the steps.

What you are seeing is the expected behavior because you clicked on the link after sharing. This is similar to a fresh install case where you click on a link, get routed to the App Store, install the app then open it.

It would have been a bug if you shared a link, resumed the app and got deep linked with the link you just shared. This happens with Facebook, Twitter and Slack because they scrape the link as you share it effectively sending a click to our server so we deep link you. Thankfully we have code to account for that and ignore this automatic click.

I tested with Telegram and it doesn't do the automatic scraping. I also updated to the latest Skype version and it redirects correctly after showing some web view. Oddly enough it uses URI schemes and works on iOS 9.2.1

Hope this clarified. Let me know if you have other questions.