From 693ebcd670856c7e373f5218cd5f342fd1f94d38 Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Thu, 21 Nov 2024 13:32:29 -0300 Subject: [PATCH] WIP --- ios/Runner/AppDelegate.swift | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 4f2d7865..dd23187e 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -1,14 +1,22 @@ import UIKit - +import app_links import Flutter -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GeneratedPluginRegistrant.register(with: self) + + // Retrieve the link from parameters + if let url = AppLinks.shared.getLink(launchOptions: launchOptions) { + // We have a link, propagate it to your Flutter app or not + AppLinks.shared.handleLink(url: url) + return true // Returning true will stop the propagation to other packages + } + return super.application(application, didFinishLaunchingWithOptions: launchOptions) } } \ No newline at end of file