WIP
This commit is contained in:
parent
00e96b5428
commit
693ebcd670
|
@ -1,14 +1,22 @@
|
||||||
import UIKit
|
import UIKit
|
||||||
|
import app_links
|
||||||
import Flutter
|
import Flutter
|
||||||
|
|
||||||
@UIApplicationMain
|
@main
|
||||||
@objc class AppDelegate: FlutterAppDelegate {
|
@objc class AppDelegate: FlutterAppDelegate {
|
||||||
override func application(
|
override func application(
|
||||||
_ application: UIApplication,
|
_ application: UIApplication,
|
||||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||||
) -> Bool {
|
) -> Bool {
|
||||||
GeneratedPluginRegistrant.register(with: self)
|
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)
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue