Closed thisisyusub closed 1 year ago
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
@iamnijat it is not helped.
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 ?
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.
I will check this solution for now too.
@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.
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, 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.
@darshankawar I have checked your mentioned solutions.
Thanks for your patience. I am keeping this issue open and labeling for further insights on expected behavior.
/cc @russellwheatley
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.
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.
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.
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?
@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 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.
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.
Please check if there is a way to reproduce steps for the example.
Please check if there is a way to reproduce the example with swift.
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!
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?
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!
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.
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
Configured Url Types
Turned on Associated Domains in developer.apple.com
Provided Apple Store ID (but it is not correct apps id it is other app, is used just for test) and Team ID
Steps to reproduce
Steps to reproduce the behavior:
void main() async { runZonedGuarded<Future>(
() async {
WidgetsFlutterBinding.ensureInitialized();
/// other logics
); }
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!
Dart SDK 2.18.2 Flutter SDK 3.3.4 azerconnect_inside 1.0.0+9
dependencies:
dev dependencies:
dependency overrides:
transitive dependencies: