uaestats_fe/ios/Runner/AppDelegate.swift
2026-05-16 11:31:32 +05:30

29 lines
1.0 KiB
Swift
Executable File

import Flutter
import UIKit
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
// Called by iOS when UAE PASS app redirects back to your app scheme.
// aegovfcscstats://resume_authn?url=<encoded-original-successURL>
override func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey: Any] = [:]
) -> Bool {
// Post to Flutter so the WebView can load the original successURL (step 7).
NotificationCenter.default.post(
name: NSNotification.Name("UaePassCallback"),
object: url.absoluteString
)
// Always call super lets other plugins (Firebase, etc.) handle their own schemes.
return super.application(app, open: url, options: options)
}
}