Super kickstart video for Dynamic Links on iOS, thanks!
@linkonsid88832 жыл бұрын
I'm trying to open the app from deeplink when the app is closed. It does open my app but open url methods are not called. What should I do here?
@Yトーマ4 жыл бұрын
It seems to have to write down the codes "continue activity" inside scene delegate, not app delegate if you use iOS above 13.
@artuhrtsau83014 жыл бұрын
I think it's func scene(_ scene: UIScene, continue userActivity: NSUserActivity) { } on sceneDelegate, I hope this reply could help other people who met same issue as I did.
@H0neyHunter Жыл бұрын
@@artuhrtsau8301 not working :( Fully AppDelegate Code func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { if let incomingURL = userActivity.webpageURL { let linkHandled = DynamicLinks.dynamicLinks().handleUniversalLink(incomingURL) { DynamicLink, error in guard error == nil else { print(error?.localizedDescription ?? "") return } if let dynamicLink = DynamicLink { self.handleIncomingDynamicLink(dynamicLink) print("continue url app çalıştı \(dynamicLink)") } } if linkHandled { return true }else { return false } } return false } //Deep Link Uygulama Yüklü değilken çalıştı. //Deep Link func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { print("open url app çalıştı \(url.absoluteString)") if let dynamiclinks = DynamicLinks.dynamicLinks().dynamicLink(fromCustomSchemeURL: url) { self.handleIncomingDynamicLink(dynamiclinks) return true }else { return false } } //DEEP LİNK func handleIncomingDynamicLink(_ dynamicLink: DynamicLink){ guard let url = dynamicLink.url else { print("That's weiird. My dynamic link object has no url return") return } //Doğru Yönetm Buu Bölüm /* guard let components = URLComponents(url: url, resolvingAgainstBaseURL: false), let queryItems = components.queryItems else {return} for i in queryItems { print("Değer: \(i.value ?? "Alamadı")") UserDefaults.standard.set(Int(i.value!), forKey: "ilanno") NotificationCenter.default.post(Notification(name: Notification.Name("didReceiveNotification"))) break } */ print("Your incoming link parameter is \(url.absoluteString)") let urls = url.absoluteString if let index = urls.range(of: "/data?=")?.upperBound { let dataSubstring = String(urls[index...]) UserDefaults.standard.set(Int(dataSubstring), forKey: "ilanno") NotificationCenter.default.post(Notification(name: Notification.Name("didReceiveNotification"))) } }
@RomanMedvid6 жыл бұрын
Excellent. Thanks for the great video
@srstudios63746 жыл бұрын
any chance of the RecipeRally project making it to github?
@jeessonsooraj70065 жыл бұрын
great video
@vanessanajem64914 жыл бұрын
Restorationhandler method not being called. Can't seem to find the issue
@GrantDrinkwater Жыл бұрын
same here
@ritumathurwedig Жыл бұрын
It is not working when app preview page is disabled.
@umtlabs74335 жыл бұрын
Let's say your app is installed on your device already but it is not running in the background. If you now click the dynamic link, it will open your app, but application(_:continue userActivity:) does NOT get called. So how could you receive the dynamicLink URL in this scenario?
Hi, I'd like to use a DynamicLink with an Enterprise distribution app, so it doesn't (can't) have even a placeholder App Store entry, and therefore no Apple ID - can I use an alternative to the Apple ID, or perhaps one borrowed from another app, like you suggest?
@manuelcubillo555 жыл бұрын
I tried this and it opens the app, but it never hits the application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) app delegate method. I'm not sure what I'm doing wrong. Has anyone else ran into this issue?
@manuelcubillo555 жыл бұрын
I ended up finding out why it wasn't being called in my case. I created a brand new Xcode 11 project which is using scenedelegate as well as appdelegate. Universal links calls this method func scene(_ scene: UIScene, continue userActivity: NSUserActivity) in the scenedelegate instead of the appdelegate. Full explanation here github.com/firebase/firebase-ios-sdk/issues/3918
@tapashm424 жыл бұрын
@@manuelcubillo55 Can you please help me? I am facing one problem. It's working fine when the app is running and in the background. But when the app is installed but not launched at that time it's simply opening the app but not redirecting to the respective screen. Please help me to get out of this situation. Here is my code: func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any]) -> Bool { return application(app, open: url, sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String, annotation: "") } func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool { if let dynamicLink = DynamicLinks.dynamicLinks().dynamicLink(fromCustomSchemeURL: url) { if dynamicLink.matchType == .unique { handleDynamicLink(dynamicLink) } return true } return false }
@migurena4 жыл бұрын
I OWE YOU MY LIFE
@mohammedshraim64126 жыл бұрын
better than Apple documentation :) Thanks
@SveeNe10005 жыл бұрын
Hello, have some questions. Here you "hardcoded" deep link parameters (hello=something, foo=something). But what if I need to send links to 100 people and I need these parameters to be unique for each person?
@SanthoshThiyagarajanPage5 жыл бұрын
checkout kzbin.info/www/bejne/gqKmmmCKlrqZgNU
@hugovangalen4 жыл бұрын
So... these links are not really Dynamic Links. The name is very confusing and misleading :-) When setting them up in Firebase, they are basically "fixed" URLs. Any additional parameter=value in the URL is not passed-through to the app. So it's impossible to use a unique link, say, for each user of your app without constructing such a "fixed" link via Firebase. So you need to manage thousands if not tens-of-thousands such URLs, a problem that would neatly be solved if these would be truly dynamic.
@NesCroft3 жыл бұрын
thats where i'm stuck too. i need to send an event id with the link. any solutions besides creating a ton of these "dynamic" links?