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

[iOS] Branch SDK Listener Fails to Receive Immediate Session Data When App Opened via Branch Link #391

Open chiragvorasav opened 1 week ago

chiragvorasav commented 1 week ago

To Reproduce
Steps to reproduce the behavior:

  1. Update the Flutter SDK to version 3.19.3 and the flutter_branch_sdk package to version ^8.2.0.
  2. Initialize the Branch SDK in the main.dart file using the method:
    await FlutterBranchSdk.init(enableLogging: false, disableTracking: false);
  3. Set up the listener using:
    FlutterBranchSdk.listSession().listen(...);
  4. Click a Branch link from the Branch dashboard, e.g., in Slack.
  5. Observe that the app opens but does not receive session data immediately. Instead, you receive:
    {+is_first_session: false, +clicked_branch_link: false}
  6. Put the app in the background and then bring it to the foreground. Only then does the correct session data response arrive.

Expected Behavior
When the app is opened via a Branch link, the listener should immediately receive the correct session data containing the clicked link information.

Screenshots
A screen recording of the issue is available https://drive.google.com/file/d/1AuEbJy2l-8amhSeyT7SKhWLfAZcbkO6g/view?usp=drive_link

Mobile (Please complete the following information. Remove if not Mobile):

Additional Context


Let me know if you need further clarifications or updates!

chiragvorasav commented 1 week ago

Hello,

we are waiting for your response.

RodrigoSMarques commented 1 week ago

I can't reproduce your problem.

It's working normally here, so there's no answer for now.

chiragvorasav commented 1 week ago

I am currently facing the issue still . Earlier, I encountered issue #365. Could you please suggest a solution or workaround for this?

RodrigoSMarques commented 1 week ago

365 is not an issue. It is a code PR between branches, after a new release

The problem you are reporting existed in version 7.x.

In version 8.x, after testing with developers from several projects, it was considered resolved.

I ran several tests with my project and I can't reproduce the problem. In all executions, the application opened and was able to access the deeplink data.

There is an issue where a developer is having problems due to a conflict with another package. After removing the conflicting package, the error stopped occurring.

There is another issue, where the project was configured with the test keys and the deeplink was with the production key.

Without knowing your project, I cannot reproduce it.

Still evaluating.

chiragvorasav commented 1 week ago

Sorry, my mistake. Could you please check this?

"https://github.com/RodrigoSMarques/flutter_branch_sdk/issues/355"

https://github.com/RodrigoSMarques/flutter_branch_sdk/issues/355

RodrigoSMarques commented 1 week ago

Yes. But note that he was using version 7.x, which as I reported above had a problem.

The solution for him was to update to version 8.x.

You will find other issues and in all of them the guidance was to update to version 8.x.

Since there were no other comments on the issue, I understand that changing the version from 7.x to 8.x solved the problem.