Open AndrewPiterov opened 1 year ago
In my case, there was another package which overrides the application:openURL:options:
and application:continueUserActivity:restorationHandler:
methods of UIApplication
and they were returning true
.
This was causing the uni_link package to never be able to catch the incoming urls. I have just reconfigured the other package to return false
if the url is not about its logic and that solved the problem.
In my case, there was another package which overrides the
application:openURL:options:
andapplication:continueUserActivity:restorationHandler:
methods ofUIApplication
and they were returningtrue
.This was causing the uni_link package to never be able to catch the incoming urls. I have just reconfigured the other package to return
false
if the url is not about its logic and that solved the problem.
How did you reconfigure that? I am trying to use firebase dynamic links with it. I think I have the same issue as yours. How can I solve it?
Same here. Firebase Dynamic Links keeps blocking uni_links from receiving the uriLinkStream or initialUri. Any ideas on how to solve this?
Why do you need both Firebase Dynamic Links and uni_links at the same time? As far as I know they have similar purposes.
Think I got it to work. I our case we had ONE domain to handle DeepLinks (www.ourdomain.com) and another to handle FirebaseDynamic Links (app.ourdomain.com). Problem was, I added both domains under FirebaseDynamicLinksCustomDomains
in Info.plist file.
After deleting the DeepLink url from that entry, all works well: Firebase handles its links, and leaves all others to uni_links.
Why do you need both Firebase Dynamic Links and uni_links at the same time? As far as I know they have similar purposes.
If you want to send people to the App Store or Google Play when they don't have the app installed, I think that's the only way. It also has support for Analytics and other stuff.
Think I got it to work. I our case we had ONE domain to handle DeepLinks (www.ourdomain.com) and another to handle FirebaseDynamic Links (app.ourdomain.com). Problem was, I added both domains under
FirebaseDynamicLinksCustomDomains
in Info.plist file.After deleting the DeepLink url from that entry, all works well: Firebase handles its links, and leaves all others to uni_links.
I'm not using a custom domain. I have myApp.page.link
that should link to my actual URL. Can you explain a bit more in detail how you solved it?
In my case, there was another package which overrides the
application:openURL:options:
andapplication:continueUserActivity:restorationHandler:
methods ofUIApplication
and they were returningtrue
.This was causing the uni_link package to never be able to catch the incoming urls. I have just reconfigured the other package to return
false
if the url is not about its logic and that solved the problem.
In my case, i custom application:continueUserActivity:restorationHandler:
for handle Call Recents History when select a history call should open my application / call screen and i also use uni_link as well.
Bug:
override func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
if (call_history) {
// open call screen in my app.
return true
}
return false
}
Work fine:
override func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
if (call_history) {
// My custom code
}
// Don't for get to return super.
return super.application(application, continue: userActivity, restorationHandler: restorationHandler)
}
got the same behaviour when the app is in background but it does work when the app is terminated. any guide ?
@objc class AppDelegate: FlutterAppDelegate, MessagingDelegate { override func application( application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { FirebaseApp.configure() Messaging.messaging().delegate = self GeneratedPluginRegistrant.register(with: self) if #available(iOS 10.0, *) { // For iOS 10 display notification (sent via APNS) UNUserNotificationCenter.current().delegate = self let authOptions: UNAuthorizationOptions = [.alert, .sound] UNUserNotificationCenter.current().requestAuthorization( options: authOptions, completionHandler: {, _ in }) } else { let settings: UIUserNotificationSettings = UIUserNotificationSettings(types: [.alert, .sound], categories: nil) application.registerUserNotificationSettings(settings) }
application.registerForRemoteNotifications()
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
} }
im using this for in my "appdelegate.swift" file I need above code for notification and dont want to remove it I have no experience in swift, how to add/change code for deep link in this file?
ios/Runner/Runner.entitlements
which looks like as belowuriLinkStream
andgetInitialUri
;In the end, when I get from Firebase a link for verifying email, e.g.
https://myapp.page.link/__/auth/action?mode=verifyEmail&....
I try to open this Universal link from some email app then iOS navigates me to my app, but the app does not get the link withuriLinkStream
to handle it. But if I change the mentioned link into a Custom link asmyapp://__/auth/action?mode=verifyEmail&....
my app handles the Custom link as expected.Shortly,
What could I be missing for Universal link?