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
731 stars 228 forks source link

Not getting any data only on the iOS in listSession #1397

Closed Hozefa04 closed 3 months ago

Hozefa04 commented 3 months ago

Describe the bug

My issue is related to the flutter_branch_sdk but as Rodrigo asked me to raise an issue here because the flutter sdk is just a wrapper, I am opening the issue here.

The issue link: https://github.com/RodrigoSMarques/flutter_branch_sdk/issues/313

I integrated branch sdk on my app a while ago and everything was working fine until a few weeks ago when suddenly deep links stopped working on iOS. On android its working fine. Please see the issue I have linked for more details. I have followed all the steps correctly and all the tests passes as well. I don't know whats the issue.

Steps to reproduce

Initiating Branch integration verification

------ Checking for URI scheme correctness ------ PASS: Dashboard Link Settings page 'playshotcaller://' compared to client side 'playshotcaller://'

-- Checking for bundle identifier correctness --- PASS: Dashboard Link Settings page 'com.app.shotcaller' compared to client side 'com.app.shotcaller'

----- Checking for iOS Team ID correctness ------ PASS: Dashboard Link Settings page 'A5WN3F8742' compared to client side 'A5WN3F8742'


-----To test your deeplink routing append ?bnc_validate=true to any branch link and click it on your mobile device-----

Branch Integration Next Steps:

Great! Remove the 'validateSDKIntegration' line in your app.

Next check your deep link routing.

Append '?bnc_validate=true' to any of your app's Branch links and click on it on your mobile device (not the Simulator!) to start the test.

For instance, to validate a link like: https://.app.link/NdJ6nFzRbK

click on: https://.app.link/NdJ6nFzRbK?bnc_validate=true

Expected behavior

I should be getting some data in the listenSession stream but not getting any data. Also if I call the handleLink and pass the same link and call it manually, it works.

SDK Version

3.4.3

XCode Version

15.3

Device

iPhone 12

OS

17.5

Additional Information/Context

No response

Hozefa04 commented 3 months ago

I am closing this as I found the issue. Some native code from a share package that I am using was somehow conflicting with the SDK. I am still not sure why but after removing that code, deep links are working again!

ashu-pietech commented 3 months ago

@Hozefa04 can you tell me what was that package and what did you removed? I'm facing similar issue in iOS only

Benson194 commented 1 month ago

facing the same issue on IOS 17.2 on iPhone 15 Pro Max intermittently.

Hozefa04 commented 1 month ago

@Hozefa04 can you tell me what was that package and what did you removed? I'm facing similar issue in iOS only

Sorry for the late reply. I was using a package called appinio_social_share and for tiktok share to work, I had to write some native code on iOS side. I don't know why but for some reason, that code was interfering with branch io and the links were not working on iOS. So I removed that native code. If you are facing a similar issue and also have some native code written in iOS, try removing that and see if it works.

Hozefa04 commented 1 month ago

facing the same issue on IOS 17.2 on iPhone 15 Pro Max intermittently.

Check this reply: https://github.com/BranchMetrics/ios-branch-deep-linking-attribution/issues/1397#issuecomment-2242062745

Benson194 commented 1 month ago

For me, i resolved it via calling FlutterBranchSdk.handleDeepLink(url) first before calling FlutterBranchSdk.listSession()

Hozefa04 commented 1 month ago

For me, i resolved it via calling FlutterBranchSdk.handleDeepLink(url) first before calling FlutterBranchSdk.listSession()

How do you get the URL? You can only get the URL in the listenSession right?