* feat(mobile): passkey bridge for ios * fix(mobile): ios passkey bridge in one file * merge Passkeys.swift into PasskeyHostApiImpl.swift * set up the host api on the main engine only * map the json with Codable structs, with base64url in the coder data strategies * throw on a missing attestation object or an unexpected credential type * need iOS 17.4, where a passkey registration can exclude the account's passkeys * fix(mobile): ios passkeys from ios 16 Passkeys are on from iOS 16 again. The platform registration only takes excludedCredentials from iOS 17.4, so that check keeps its own comment.
42 lines
2.0 KiB
Swift
42 lines
2.0 KiB
Swift
import native_video_player
|
|
|
|
@main
|
|
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
|
|
override func application(
|
|
_ application: UIApplication,
|
|
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
|
) -> Bool {
|
|
// Required for flutter_local_notification
|
|
if #available(iOS 10.0, *) {
|
|
UNUserNotificationCenter.current().delegate = self as UNUserNotificationCenterDelegate
|
|
}
|
|
|
|
SwiftNativeVideoPlayerPlugin.cookieStorage = URLSessionManager.cookieStorage
|
|
URLSessionManager.patchBackgroundDownloader()
|
|
BackgroundWorkerApiImpl.registerBackgroundWorkers()
|
|
|
|
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
|
}
|
|
|
|
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
|
|
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
|
|
let messenger = engineBridge.applicationRegistrar.messenger()
|
|
AppDelegate.registerPlugins(with: engineBridge.pluginRegistry, messenger: messenger)
|
|
PasskeyHostApiSetup.setUp(binaryMessenger: messenger, api: PasskeyHostApiImpl())
|
|
}
|
|
|
|
public static func registerPlugins(with registry: FlutterPluginRegistry, messenger: FlutterBinaryMessenger) {
|
|
NativeSyncApiImpl.register(with: registry.registrar(forPlugin: NativeSyncApiImpl.name)!)
|
|
PermissionApiSetup.setUp(binaryMessenger: messenger, api: PermissionApiImpl())
|
|
LocalImageApiSetup.setUp(binaryMessenger: messenger, api: LocalImageApiImpl())
|
|
RemoteImageApiSetup.setUp(binaryMessenger: messenger, api: RemoteImageApiImpl())
|
|
BackgroundWorkerFgHostApiSetup.setUp(binaryMessenger: messenger, api: BackgroundWorkerApiImpl())
|
|
ConnectivityApiSetup.setUp(binaryMessenger: messenger, api: ConnectivityApiImpl())
|
|
NetworkApiSetup.setUp(binaryMessenger: messenger, api: NetworkApiImpl())
|
|
}
|
|
|
|
public static func cancelPlugins(with engine: FlutterEngine) {
|
|
(engine.valuePublished(byPlugin: NativeSyncApiImpl.name) as? NativeSyncApiImpl)?.detachFromEngine()
|
|
}
|
|
}
|