Skip to content

🐛 [Firebase Dynamic Links] getInitialLink and onLink doesn't receive any link while application is terminated (iOS) #9829

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

Closed
thisisyusub opened this issue Oct 31, 2022 · 20 comments
Labels
closed-by-bot platform: ios Issues / PRs which are specifically for iOS. plugin: dynamic_links resolution: no-response Customer did not respond after some time. Stale Issue with no recent activity type: bug Something isn't working

Comments

@thisisyusub
Copy link

Bug report

Hi. I am trying to implement dynamic links using Firebase. But it does not work (it opens the application but does not catch the initial link or onLink listener). I have checked before reported solutions (in this repository) but it is not working for my case. I keep in mind that it is working on the Android side correctly.

Flutter version: 3.3.4
Xcode: 14.0.1
Tested iOS version: iOS 16+
Flutter Dynamic Links Version: 5.0.3
Firebase Core Version: 2.1.1

I want to mention some points:

I have added Associated Domains in Xcode
Screen Shot 2022-10-31 at 19 29 25
Configured Url Types
Screen Shot 2022-10-31 at 19 30 10
Turned on Associated Domains in developer.apple.com
Screen Shot 2022-10-31 at 19 31 24
Provided Apple Store ID (but it is not correct apps id it is other app, is used just for test) and Team ID
Screen Shot 2022-10-31 at 19 35 01

Steps to reproduce

Steps to reproduce the behavior:

  1. Dynamic link receiver code in main.dart
 final initialLinkNotifier = ValueNotifier<String?>(null);

void main() async {
  runZonedGuarded<Future<void>>(
    () async {
      WidgetsFlutterBinding.ensureInitialized();
      /// other logics


      FirebaseDynamicLinks.instance.onLink.listen(
      (PendingDynamicLinkData? dynamicLink) async {
        final deepLink = dynamicLink?.link;
        if (deepLink != null) {
          initialLinkNotifier.value = 'listener: ${deepLink.toString()}';
        }
      },
    );

    final initalLink = await FirebaseDynamicLinks.instance.getInitialLink();
    if (initalLink != null) {
      initialLinkNotifier.value = 'initial: ${initalLink.link.toString()}';
    }
    },
    (error, stack) => FirebaseCrashlytics.instance.recordError(
      error,
      stack,
      fatal: true,
    ),
  );
}

Note: Notifier just used to show dynamic link in the ui (working or not)

  1. '...'
  2. See error or incorrect behavior

Expected behavior

I can't test it in Simulator because it gives the following error:
Simulator Screen Shot - iPhone 14 Plus - 2022-10-31 at 19 47 03

But in real device (iOS 16, IPhone 11) it is working while application is running in foreground, but when app is terminated, it opens application but not catching dynamic link neither getInitialLink nor onLink listener.

Flutter doctor

Run flutter doctor and paste the output below:

Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.4, on macOS 12.6 21G115 darwin-arm, locale
    en-AZ)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] Android Studio (version 2021.3)
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.72.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

• No issues found!

Flutter dependencies

Run flutter pub deps -- --style=compact and paste the output below:

Click To Expand
Dart SDK 2.18.2
Flutter SDK 3.3.4
azerconnect_inside 1.0.0+9

dependencies:
- app_theme 0.0.1 [flutter responsive_builder]
- cached_network_image 3.2.2 [flutter flutter_cache_manager octo_image cached_network_image_platform_interface cached_network_image_web]
- cupertino_icons 1.0.5
- dio 4.0.6 [http_parser path]
- dots_indicator 2.1.0 [flutter]
- dotted_border 2.0.0+3 [flutter path_drawing]
- equatable 2.0.5 [collection meta]
- expandable 5.0.1 [flutter]
- expandable_page_view 1.0.17 [flutter]
- file_picker 5.2.2 [flutter flutter_web_plugins flutter_plugin_android_lifecycle plugin_platform_interface ffi path win32]
- firebase_core 2.1.1 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_crashlytics 3.0.3 [firebase_core firebase_core_platform_interface firebase_crashlytics_platform_interface flutter stack_trace]
- firebase_dynamic_links 5.0.3 [firebase_core firebase_core_platform_interface firebase_dynamic_links_platform_interface flutter meta plugin_platform_interface]
- firebase_remote_config 3.0.3 [firebase_core firebase_core_platform_interface firebase_remote_config_platform_interface firebase_remote_config_web flutter]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math sky_engine]
- flutter_html 2.2.1 [html csslib flutter_layout_grid video_player chewie webview_flutter chewie_audio flutter_svg flutter_math_fork collection numerus flutter]
- flutter_layout_grid 2.0.1 [flutter collection meta quiver]
- flutter_localizations 0.0.0 [flutter intl characters clock collection material_color_utilities meta path vector_math]
- flutter_riverpod 2.0.2 [collection flutter meta riverpod state_notifier]
- flutter_secure_storage 6.0.0 [flutter flutter_secure_storage_linux flutter_secure_storage_macos flutter_secure_storage_platform_interface flutter_secure_storage_web flutter_secure_storage_windows meta]
- flutter_svg 1.1.6 [flutter meta path_drawing vector_math xml]
- form_validator 1.0.3
- go_router 5.1.1 [collection flutter flutter_web_plugins logging meta]
- infinite_scroll_pagination 3.2.0 [flutter sliver_tools]
- intl 0.17.0 [clock path]
- loading_animation_widget 1.2.0+3 [flutter]
- local_auth 2.1.2 [flutter intl local_auth_android local_auth_ios local_auth_platform_interface local_auth_windows]
- meta 1.8.0
- package_info_plus 1.4.3+1 [flutter package_info_plus_platform_interface package_info_plus_linux package_info_plus_macos package_info_plus_windows package_info_plus_web]
- pretty_dio_logger 1.2.0-beta-1 [dio]
- responsive_builder 0.4.3 [flutter]
- rxdart 0.27.5
- share_plus 4.5.3 [cross_file meta mime flutter share_plus_platform_interface share_plus_linux share_plus_macos share_plus_windows share_plus_web]
- shared_preferences 2.0.15 [flutter shared_preferences_android shared_preferences_ios shared_preferences_linux shared_preferences_macos shared_preferences_platform_interface shared_preferences_web shared_preferences_windows]
- shimmer 2.0.0 [flutter]
- url_launcher 6.1.6 [flutter url_launcher_android url_launcher_ios url_launcher_linux url_launcher_macos url_launcher_platform_interface url_launcher_web url_launcher_windows]
- video_player 2.4.7 [flutter html video_player_android video_player_avfoundation video_player_platform_interface video_player_web]

dev dependencies:
- build_runner 2.3.2 [args async analyzer build build_config build_daemon build_resolvers build_runner_core code_builder collection crypto dart_style frontend_server_client glob graphs http_multi_server io js logging meta mime package_config path pool pub_semver pubspec_parse shelf shelf_web_socket stack_trace stream_transform timing watcher web_socket_channel yaml]
- flutter_launcher_icons 0.10.0 [args checked_yaml cli_util image json_annotation path yaml]
- flutter_lints 2.0.1 [lints]
- flutter_test 0.0.0 [flutter test_api path fake_async clock stack_trace vector_math async boolean_selector characters collection matcher material_color_utilities meta source_span stream_channel string_scanner term_glyph]
- mockito 5.3.2 [analyzer build code_builder collection dart_style matcher meta path source_gen test_api]

dependency overrides:
- flutter_layout_grid 2.0.1 [flutter collection meta quiver]
- flutter_svg 1.1.6 [flutter meta path_drawing vector_math xml]

transitive dependencies:
- _fe_analyzer_shared 50.0.0 [meta]
- _flutterfire_internals 1.0.6 [cloud_firestore_platform_interface cloud_firestore_web collection firebase_core firebase_core_platform_interface flutter meta]
- analyzer 5.2.0 [_fe_analyzer_shared collection convert crypto glob meta package_config path pub_semver source_span watcher yaml]
- archive 3.3.2 [crypto path]
- args 2.3.1
- async 2.9.0 [collection meta]
- boolean_selector 2.1.0 [source_span string_scanner]
- build 2.3.1 [analyzer async convert crypto glob logging meta path]
- build_config 1.1.1 [checked_yaml json_annotation path pubspec_parse yaml]
- build_daemon 3.1.0 [built_collection built_value http_multi_server logging path pool shelf shelf_web_socket stream_transform watcher web_socket_channel]
- build_resolvers 2.1.0 [analyzer async build crypto graphs logging path package_config pool pub_semver stream_transform yaml]
- build_runner_core 7.2.7 [async build build_config build_resolvers collection convert crypto glob graphs json_annotation logging meta path package_config pool timing watcher yaml]
- built_collection 5.1.1
- built_value 8.4.2 [built_collection collection fixnum meta]
- cached_network_image_platform_interface 2.0.0 [flutter flutter_cache_manager]
- cached_network_image_web 1.0.2 [flutter flutter_cache_manager cached_network_image_platform_interface]
- characters 1.2.1
- checked_yaml 2.0.1 [json_annotation source_span yaml]
- chewie 1.3.5 [cupertino_icons flutter provider video_player wakelock]
- chewie_audio 1.3.0 [cupertino_icons flutter video_player]
- cli_util 0.3.5 [meta path]
- clock 1.1.1
- cloud_firestore_platform_interface 5.8.3 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- cloud_firestore_web 3.0.3 [_flutterfire_internals cloud_firestore_platform_interface collection firebase_core firebase_core_web flutter flutter_web_plugins js]
- code_builder 4.3.0 [built_collection built_value collection matcher meta]
- collection 1.16.0
- convert 3.1.1 [typed_data]
- cross_file 0.3.3+2 [js meta]
- crypto 3.0.2 [typed_data]
- csslib 0.17.2 [source_span]
- dart_style 2.2.4 [analyzer args path pub_semver source_span]
- fake_async 1.3.1 [clock collection]
- ffi 2.0.1
- file 6.1.4 [meta path]
- firebase_core_platform_interface 4.5.2 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.0.1 [firebase_core_platform_interface flutter flutter_web_plugins js meta]
- firebase_crashlytics_platform_interface 3.3.4 [_flutterfire_internals collection firebase_core flutter meta plugin_platform_interface]
- firebase_dynamic_links_platform_interface 0.2.3+19 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_remote_config_platform_interface 1.1.23 [_flutterfire_internals firebase_core flutter meta plugin_platform_interface]
- firebase_remote_config_web 1.1.12 [firebase_core firebase_core_web firebase_remote_config_platform_interface flutter flutter_web_plugins js]
- fixnum 1.0.1
- flutter_blurhash 0.7.0 [flutter]
- flutter_cache_manager 3.3.0 [clock collection file flutter http path path_provider pedantic rxdart sqflite uuid]
- flutter_math_fork 0.6.3+1 [flutter flutter_svg provider meta collection tuple]
- flutter_plugin_android_lifecycle 2.0.7 [flutter]
- flutter_secure_storage_linux 1.1.1 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_macos 1.1.1 [flutter flutter_secure_storage_platform_interface]
- flutter_secure_storage_platform_interface 1.0.0 [flutter plugin_platform_interface]
- flutter_secure_storage_web 1.0.2 [flutter flutter_web_plugins flutter_secure_storage_platform_interface js]
- flutter_secure_storage_windows 1.1.2 [flutter flutter_secure_storage_platform_interface]
- flutter_web_plugins 0.0.0 [flutter js characters collection material_color_utilities meta vector_math]
- frontend_server_client 3.1.0 [async path]
- glob 2.1.0 [async collection file path string_scanner]
- graphs 2.2.0 [collection]
- html 0.15.1 [csslib source_span]
- http 0.13.5 [async http_parser meta path]
- http_multi_server 3.2.1 [async]
- http_parser 4.0.2 [collection source_span string_scanner typed_data]
- image 3.2.2 [archive meta xml]
- io 1.0.3 [meta path string_scanner]
- js 0.6.4
- json_annotation 4.7.0 [meta]
- lints 2.0.1
- local_auth_android 1.0.14 [flutter flutter_plugin_android_lifecycle intl local_auth_platform_interface]
- local_auth_ios 1.0.10 [flutter intl local_auth_platform_interface]
- local_auth_platform_interface 1.0.5 [flutter intl plugin_platform_interface]
- local_auth_windows 1.0.4 [flutter local_auth_platform_interface]
- logging 1.1.0
- matcher 0.12.12 [stack_trace]
- material_color_utilities 0.1.5
- mime 1.0.2
- nested 1.0.0 [flutter]
- numerus 1.1.1
- octo_image 1.0.2 [flutter flutter_blurhash]
- package_config 2.1.0 [path]
- package_info_plus_linux 1.0.5 [package_info_plus_platform_interface flutter path]
- package_info_plus_macos 1.3.0 [flutter]
- package_info_plus_platform_interface 1.0.2 [flutter meta plugin_platform_interface]
- package_info_plus_web 1.0.6 [flutter flutter_web_plugins http meta package_info_plus_platform_interface]
- package_info_plus_windows 2.1.0 [package_info_plus_platform_interface ffi flutter win32]
- path 1.8.2
- path_drawing 1.0.1 [vector_math meta path_parsing flutter]
- path_parsing 1.0.1 [vector_math meta]
- path_provider 2.0.11 [flutter path_provider_android path_provider_ios path_provider_linux path_provider_macos path_provider_platform_interface path_provider_windows]
- path_provider_android 2.0.20 [flutter path_provider_platform_interface]
- path_provider_ios 2.0.11 [flutter path_provider_platform_interface]
- path_provider_linux 2.1.7 [ffi flutter path path_provider_platform_interface xdg_directories]
- path_provider_macos 2.0.6 [flutter path_provider_platform_interface]
- path_provider_platform_interface 2.0.5 [flutter platform plugin_platform_interface]
- path_provider_windows 2.1.3 [ffi flutter path path_provider_platform_interface win32]
- pedantic 1.11.1
- petitparser 5.1.0 [meta]
- platform 3.1.0
- plugin_platform_interface 2.1.3 [meta]
- pool 1.5.1 [async stack_trace]
- process 4.2.4 [file path platform]
- provider 6.0.4 [collection flutter nested]
- pub_semver 2.1.2 [collection meta]
- pubspec_parse 1.2.1 [checked_yaml collection json_annotation pub_semver yaml]
- quiver 3.1.0 [matcher]
- riverpod 2.0.2 [collection meta stack_trace state_notifier]
- share_plus_linux 3.0.1 [cross_file share_plus_platform_interface file flutter meta url_launcher]
- share_plus_macos 3.0.1 [share_plus_platform_interface flutter]
- share_plus_platform_interface 3.2.0 [cross_file flutter meta mime plugin_platform_interface path_provider uuid]
- share_plus_web 3.1.0 [cross_file share_plus_platform_interface url_launcher flutter flutter_web_plugins meta mime]
- share_plus_windows 3.0.1 [share_plus_platform_interface flutter meta url_launcher]
- shared_preferences_android 2.0.14 [flutter shared_preferences_platform_interface]
- shared_preferences_ios 2.1.1 [flutter shared_preferences_platform_interface]
- shared_preferences_linux 2.1.1 [file flutter path path_provider_linux path_provider_platform_interface shared_preferences_platform_interface]
- shared_preferences_macos 2.0.4 [flutter shared_preferences_platform_interface]
- shared_preferences_platform_interface 2.1.0 [flutter plugin_platform_interface]
- shared_preferences_web 2.0.4 [flutter flutter_web_plugins shared_preferences_platform_interface]
- shared_preferences_windows 2.1.1 [file flutter path path_provider_platform_interface path_provider_windows shared_preferences_platform_interface]
- shelf 1.4.0 [async collection http_parser path stack_trace stream_channel]
- shelf_web_socket 1.0.2 [shelf stream_channel web_socket_channel]
- sky_engine 0.0.99
- sliver_tools 0.2.8 [flutter]
- source_gen 1.2.6 [analyzer async build dart_style glob meta path source_span yaml]
- source_span 1.9.0 [collection path term_glyph]
- sqflite 2.2.0+2 [flutter sqflite_common path]
- sqflite_common 2.4.0+2 [synchronized path meta]
- stack_trace 1.10.0 [path]
- state_notifier 0.7.2+1 [meta]
- stream_channel 2.1.0 [async]
- stream_transform 2.0.1
- string_scanner 1.1.1 [source_span]
- synchronized 3.0.0+3
- term_glyph 1.2.1
- test_api 0.4.12 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph matcher]
- timing 1.0.0 [json_annotation]
- tuple 2.0.1
- typed_data 1.3.1 [collection]
- url_launcher_android 6.0.21 [flutter url_launcher_platform_interface]
- url_launcher_ios 6.0.17 [flutter url_launcher_platform_interface]
- url_launcher_linux 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_macos 3.0.1 [flutter url_launcher_platform_interface]
- url_launcher_platform_interface 2.1.1 [flutter plugin_platform_interface]
- url_launcher_web 2.0.13 [flutter flutter_web_plugins url_launcher_platform_interface]
- url_launcher_windows 3.0.1 [flutter url_launcher_platform_interface]
- uuid 3.0.6 [crypto]
- vector_math 2.1.2
- video_player_android 2.3.9 [flutter video_player_platform_interface]
- video_player_avfoundation 2.3.7 [flutter video_player_platform_interface]
- video_player_platform_interface 5.1.4 [flutter plugin_platform_interface]
- video_player_web 2.0.12 [flutter flutter_web_plugins video_player_platform_interface]
- wakelock 0.6.2 [flutter meta wakelock_macos wakelock_platform_interface wakelock_web wakelock_windows]
- wakelock_macos 0.4.0 [flutter flutter_web_plugins wakelock_platform_interface]
- wakelock_platform_interface 0.3.0 [flutter meta]
- wakelock_web 0.4.0 [flutter flutter_web_plugins js wakelock_platform_interface]
- wakelock_windows 0.2.1 [flutter wakelock_platform_interface win32]
- watcher 1.0.2 [async path]
- web_socket_channel 2.2.0 [async crypto stream_channel]
- webview_flutter 2.8.0 [flutter webview_flutter_android webview_flutter_platform_interface webview_flutter_wkwebview]
- webview_flutter_android 2.10.4 [flutter webview_flutter_platform_interface]
- webview_flutter_platform_interface 1.9.5 [flutter meta plugin_platform_interface]
- webview_flutter_wkwebview 2.9.5 [flutter path webview_flutter_platform_interface]
- win32 3.0.1 [ffi]
- xdg_directories 0.2.0+2 [meta path process]
- xml 6.1.0 [collection meta petitparser]
- yaml 3.1.1 [collection source_span string_scanner]

@thisisyusub thisisyusub added Needs Attention This issue needs maintainer attention. type: bug Something isn't working labels Oct 31, 2022
@iamnijat
Copy link

Future<void> handleDynamicLinks() async {
    /// launches on initial run
    final data = await FirebaseDynamicLinks.instance.getInitialLink();
    await _handleDeepLink(data);

    // listens for app-alive links taps
    FirebaseDynamicLinks.instance.onLink(onSuccess: (_data) async {
      _handleDeepLink(_data);
    });
  }

  Future<void> _handleDeepLink(
      PendingDynamicLinkData? data) async {
    final deepLink = data?.link;
    print(deepLink);
      }

I am not sure but maybe this can fix your issue

@thisisyusub
Copy link
Author

@iamnijat it is not helped.

@darshankawar darshankawar added the triage Issue is currently being triaged. label Nov 1, 2022
@darshankawar
Copy link

Thanks for the detailed report @thisisyusub
Can you take a look at this issue and underlying comments and see if they help in your case ?

@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Nov 1, 2022
@thisisyusub
Copy link
Author

Thanks for the detailed report @thisisyusub
Can you take a look at this issue and underlying comments and see if they help in your case ?

Yeap sure, I will check out and give info.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Nov 1, 2022
@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Nov 1, 2022
@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Nov 1, 2022
@thisisyusub
Copy link
Author

thisisyusub commented Nov 1, 2022

I have checked the solutions, @darshankawar.

Firstly, I have added the following lines to Info.plist:

Screen Shot 2022-11-01 at 13 42 40

According to another comment, I have checked my API key in Google Cloud Console (before it was unrestricted):

Screen Shot 2022-11-01 at 13 45 22

Screen Shot 2022-11-01 at 13 45 49

I have checked the app again with a new link created in Firebase Dynamic Link Dashboard with real ios device again and it is not working.

@thisisyusub
Copy link
Author

I will check this solution for now too.

@thisisyusub
Copy link
Author

thisisyusub commented Nov 1, 2022

@darshankawar btw, I have tested app links and it is working, it catches the initial link so the problem is coming from the Firebase side. I have checked all things again.

@darshankawar
Copy link

darshankawar commented Nov 1, 2022

Thanks for providing these updates. Have you already configured Firebase using flutterfire configure CLI tool ? If so, can you update FlutterFire CLI by running dart pub global activate flutterfire_cli which adds the GoogleService-Info.plist to your Runner.

Also, per your findings, please run in release mode on physical device to confirm the behavior.

Also take a look at this similar issue as well.

@darshankawar darshankawar added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention This issue needs maintainer attention. labels Nov 1, 2022
@thisisyusub
Copy link
Author

thisisyusub commented Nov 1, 2022

@darshankawar, I have configured it with flutterfire cli version 0.2.6. It added GoogleSerice-Info.plist to my ios/Runner folder. I have built release ipa and downloaded it to TestFlight and tested with real device. If we are using app links package it is working.

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Nov 1, 2022
@thisisyusub
Copy link
Author

@darshankawar I have checked your mentioned solutions.

@darshankawar
Copy link

Thanks for your patience. I am keeping this issue open and labeling for further insights on expected behavior.

/cc @russellwheatley

@darshankawar darshankawar added plugin: dynamic_links platform: ios Issues / PRs which are specifically for iOS. and removed Needs Attention This issue needs maintainer attention. triage Issue is currently being triaged. labels Nov 1, 2022
@russellwheatley
Copy link
Member

Hey @thisisyusub, I've just tested the FlutterFire dynamic links example app, and I was able to receive the dynamic link with deeplink that opened the app from a terminated state. To test in debug mode, you just need to run the app in release mode flutter run --release and run on a device otherwise it will not work.

Results of flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.7, on macOS 12.5 21G72 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] IntelliJ IDEA Community Edition (version 2020.1.1)
[✓] VS Code (version 1.73.0)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

• No issues found!

I would encourage you to diagnose your specific problem as it seems to me you have something misconfigured.

@russellwheatley russellwheatley added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Nov 10, 2022
@migalv
Copy link

migalv commented Nov 12, 2022

Hello. I have the exact same issue as @thisisyusub.

My app is correctly capturing the links on Android for both cases, the app is in background or terminated.
But for iOS when the app comes from the terminated state it does not capture the link.

I'm using both the getInitialLink() method and the onLink stream, to capture the Dynamic Links.

@darshankawar btw, I have tested app links and it is working, it catches the initial link so the problem is coming from the Firebase side. I have checked all things again.

Similarly to @thisisyusub the Universal Links work without issues on iOS. And I have also tried the same solutions as @thisisyusub comments in this thread with no success.

I have created a very simple project from scratch to test but with no success either.

As @russellwheatley suggests, I have tested this on real devices, ranging from iPhone XR to iPhone 12 without success.

Important
The example app for this plugin only receives links on Android. Xcode has signing requirements that must be configured with an iOS app developer team id. Check the firebase_dynamic_links/README.md for more details.

I have to say that the Firebase Dynamic Links example is not fully set up for iOS as it is mentioned in its README. So I don't know how @russellwheatley has tested this example on iOS devices. But in any case if I try to clone the flutterfire repo and use the example I get an error saying that I don't have the provisioning profile for the io.flutter.plugins.firebase.dynamiclinksexample app id.

The debug view for my dynamic links shows that there are no errors/warnings, and I'm pretty sure everything is configured, I have already triple-checked.

Screenshot 2022-11-12 at 17 30 59

The only workaround that has worked for me is what @AnasBawazir proposes in this comment. But this shows that something must be wrong in the Firebase Dynamic Links SDK for Flutter

Also, something to note. Make sure you are installing the GoogleServices-Info.Plist manually, as this comment indicates, to make sure you have the correct GoogleServices-Info.plist. Currently, when using the flutterfire-cli, if your project contains a GoogleServices-Info.plist file it will not be overwritten, you have to manually delete it for it to be updated.

@thisisyusub
Copy link
Author

Hello again. @russellwheatley I have checked your link. When I am debugging , It shows like this, but I have configured my app with ID az.azerconnect.inside. What is the problem here? Why is dynamic link created with com.test.app id?

Screen Shot 2022-11-17 at 09 41 54

@google-oss-bot google-oss-bot added Needs Attention This issue needs maintainer attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Nov 17, 2022
@migalv
Copy link

migalv commented Nov 17, 2022

@thisisyusub this happens to me. I believe this happens if you register an app to your Firebase project and then delete it after.

In my case, I accidentally added the QA version of my app to my Production Firebase Project and since then, the dynamic links debugger always shows the warning that my QA version is missing. Even if I add it and delete it again from the registered apps

@thisisyusub
Copy link
Author

@thisisyusub this happens to me. I believe this happens if you register an app to your Firebase project and then delete it after.

In my case, I accidentally added the QA version of my app to my Production Firebase Project and since then, the dynamic links debugger always shows the warning that my QA version is missing. Even if I add it and delete it again from the registered apps

@migalv, I have not done something like this. I have configured the app this one time.

@darshankawar darshankawar removed the Needs Attention This issue needs maintainer attention. label Nov 22, 2022
@KKimj
Copy link
Contributor

KKimj commented Jan 4, 2023

Hello. @russellwheatley @darshankawar
Thank you so much for maintaining this good Flutterfire SDK.

I am also experiencing an issue where getInitialLink does not work in iOS Terminated state.

I've been troubleshooting man-day for more than 10 days.

I share the conclusion that I have obtained so far.

  • The example works works very accurately with flutter run -d iPhone

  • However, the example is difficult to reproduce starting from flutter create.

  • The example is objc-based. This may not be a big deal, but there is a difference anyway.

What I checked is as below.

  • App ID / Key Validation in Firebase Console

  • Validate API permissions in Google Cloud Console

  • flutterfire configure again and again via flutterfire CLI

  • info.plist validation

  • Runner.entitlements Validation

  • GoogleService-Info.plist Validation

I've tried my best to verify, but the only difference I can find in the end is swift and objc.

What I want to request is below.

PS.
I haven't tried to solve it yet by introducing app_links or uni_links packages.
The only solution left is to introduce this packages.

Thanks!
Happy New Year!

@russellwheatley
Copy link
Member

Interesting findings @KKimj, I wonder if it is because users have configured a Swift iOS app 🤔.

@migalv or @thisisyusub, can either of you create a repo with a reproduction of this issue? I'm happy to configure it using FF credentials so I can test on my local machine.

Out of curiosity; do either of you have a Swift iOS app setup?

@russellwheatley russellwheatley added the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Jan 30, 2023
@google-oss-bot google-oss-bot added the Stale Issue with no recent activity label Feb 8, 2023
@google-oss-bot
Copy link

Hey @thisisyusub. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link

Since there haven't been any recent updates here, I am going to close this issue.

@thisisyusub if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@darshankawar darshankawar added resolution: no-response Customer did not respond after some time. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Feb 17, 2023
@firebase firebase locked and limited conversation to collaborators Mar 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
closed-by-bot platform: ios Issues / PRs which are specifically for iOS. plugin: dynamic_links resolution: no-response Customer did not respond after some time. Stale Issue with no recent activity type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants