RodrigoSMarques / flutter_branch_sdk

Flutter Plugin for create deep link using Branch Metrics SDK. This plugin provides a cross-platform (iOS, Android, Web).
https://branch.io
MIT License
101 stars 91 forks source link

Not able to correctly read deeplink in ios devices #354

Closed rohnsht closed 3 months ago

rohnsht commented 4 months ago

Describe the bug I create a deeplink in branch which works properly with android. However, when I try to test the deep link in ios it doesn't treat the link as deeplink. I have added the log below: DeepLink Data: {+clicked_branch_link: false, +non_branch_link: https://gihui.test-app.link/sBSzHAHTtLb, +is_first_session: false}

Expected behavior The app should recognise the above link as a branch_link

Screenshot IMG_0140

Smartphone (Please complete the following information. remove session if not platform):

RodrigoSMarques commented 4 months ago

@rohnsht Is your project's uri scheme '<null>'?

Usually the uri scheme is something related to the name of the app or project.

Maybe '<null>' is not being recognized by the SDK or even by iOS.

RodrigoSMarques commented 4 months ago

image

rohnsht commented 4 months ago

@RodrigoSMarques I have added UriScheme in both branch dashboard and IosProject but it still says '<null>'. I have no idea why this is happening.

Screenshots Screenshot 2024-07-26 at 12 16 19 PM

Screenshot 2024-07-26 at 12 16 54 PM

RodrigoSMarques commented 4 months ago

this is related to your INFO.PLIST configuration. you should review it.

rohnsht commented 4 months ago

@RodrigoSMarques

This is the setup in INFO.PLIST for my project. Could you tell me what might be the issue? Thanks

`

CFBundleURLTypes CFBundleTypeRole Editor CFBundleURLName com.stampmedia.stampme CFBundleURLSchemes stampme CFBundleTypeRole Editor CFBundleURLSchemes com.googleusercontent.apps.xxxxxxxxxx branch_key live key_live_xxxxxxxxxxx test key_test_xxxxxxxxxxxx branch_universal_link_domains xxxx.app.link xxxx-alternate.app.link xxxx.test-app.link

`

RodrigoSMarques commented 4 months ago

@rohnsht

Visually, I did not find any problems with your configuration in INFO.PLIST.

Also check the configuration of the Associated Domains

If the issue persists, I suggest opening a support ticket directly with Branch at the link

They can better support you with this configuration. It is not specific to Flutter but to the native layer.

rohnsht commented 3 months ago

I needed to add Branch.setUseTestBranchKey(true) in AppDelegate to use Branch Test Key which solved the issue. Thanks @RodrigoSMarques

RodrigoSMarques commented 3 months ago

I needed to add Branch.setUseTestBranchKey(true) in AppDelegate to use Branch Test Key which solved the issue. Thanks @RodrigoSMarques @rohnsht

There is no need for you to add this directly in your native code.

You have instructions for that here