FlutterPluginAppLifeCycleDelegate
Objective-C
@interface FlutterPluginAppLifeCycleDelegate
: NSObject <UNUserNotificationCenterDelegate>
Swift
class FlutterPluginAppLifeCycleDelegate : NSObject, UNUserNotificationCenterDelegate
Propagates UIAppDelegate
callbacks to registered plugins.
-
Registers
delegate
to receive life cycle callbacks via this FlutterPluginAppLifeCycleDelegate as long as it is alive.delegate
will only be referenced weakly.Declaration
Objective-C
- (void)addDelegate: (nonnull NSObject<FlutterApplicationLifeCycleDelegate> *)delegate;
Swift
func add(_ delegate: FlutterApplicationLifeCycleDelegate)
-
Calls all plugins registered for
UIApplicationDelegate
callbacks.Declaration
Objective-C
- (BOOL)application:(nonnull UIApplication *)application didFinishLaunchingWithOptions:(nonnull NSDictionary *)launchOptions;
Swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [AnyHashable : Any] = [:]) -> Bool
Return Value
NO
if any plugin vetos application launch. -
Calls all plugins registered for
UIApplicationDelegate
callbacks.Declaration
Objective-C
- (BOOL)application:(nonnull UIApplication *)application willFinishLaunchingWithOptions:(nonnull NSDictionary *)launchOptions;
Swift
func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [AnyHashable : Any] = [:]) -> Bool
Return Value
NO
if any plugin vetos application launch. -
Called if this plugin has been registered for
UIApplicationDelegate
callbacks.Declaration
Objective-C
- (void)application:(nonnull UIApplication *)application didRegisterUserNotificationSettings: (nonnull UIUserNotificationSettings *)notificationSettings;
Swift
func application(_ application: UIApplication, didRegister notificationSettings: UIUserNotificationSettings)
-
Calls all plugins registered for
UIApplicationDelegate
callbacks.Declaration
Objective-C
- (void)application:(nonnull UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken: (nonnull NSData *)deviceToken;
Swift
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)
-
Calls all plugins registered for
UIApplicationDelegate
callbacks.Declaration
Objective-C
- (void)application:(nonnull UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(nonnull NSError *)error;
Swift
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error)
-
Calls all plugins registered for
UIApplicationDelegate
callbacks.Declaration
Objective-C
- (void)application:(nonnull UIApplication *)application didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo fetchCompletionHandler: (nonnull void (^)(UIBackgroundFetchResult))completionHandler;
Swift
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) async -> UIBackgroundFetchResult
-
Calls all plugins registered for
UIApplicationDelegate
callbacks.Declaration
Objective-C
- (void)application:(nonnull UIApplication *)application didReceiveLocalNotification:(nonnull UILocalNotification *)notification;
Swift
func application(_ application: UIApplication, didReceive notification: UILocalNotification)
-
Calls all plugins registered for
UIApplicationDelegate
callbacks in order of registration until some plugin handles the request.Declaration
Objective-C
- (BOOL)application:(nonnull UIApplication *)application openURL:(nonnull NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey, id> *) options;
Swift
func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool
Return Value
YES
if any plugin handles the request. -
Calls all plugins registered for
UIApplicationDelegate
callbacks in order of registration until some plugin handles the request.Declaration
Objective-C
- (BOOL)application:(nonnull UIApplication *)application handleOpenURL:(nonnull NSURL *)url;
Swift
func application(_ application: UIApplication, handleOpen url: URL) -> Bool
Return Value
YES
if any plugin handles the request. -
Calls all plugins registered for
UIApplicationDelegate
callbacks in order of registration until some plugin handles the request.Declaration
Objective-C
- (BOOL)application:(nonnull UIApplication *)application openURL:(nonnull NSURL *)url sourceApplication:(nonnull NSString *)sourceApplication annotation:(nonnull id)annotation;
Swift
func application(_ application: UIApplication, open url: URL, sourceApplication: String, annotation: Any) -> Bool
Return Value
YES
if any plugin handles the request. -
Calls all plugins registered for
UIApplicationDelegate
callbacks.Declaration
Objective-C
- (void)application:(nonnull UIApplication *)application performActionForShortcutItem: (nonnull UIApplicationShortcutItem *)shortcutItem completionHandler:(nonnull void (^)(BOOL))completionHandler;
Swift
func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem) async -> Bool
-
Calls all plugins registered for
UIApplicationDelegate
callbacks in order of registration until some plugin handles the request.Declaration
Objective-C
- (BOOL)application:(nonnull UIApplication *)application handleEventsForBackgroundURLSession:(nonnull NSString *)identifier completionHandler: (nonnull void (^)(void))completionHandler;
Swift
func application(_ application: UIApplication, handleEventsForBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void) -> Bool
Return Value
YES
if any plugin handles the request. -
Calls all plugins registered for
UIApplicationDelegate
callbacks in order of registration until some plugin handles the request.@returns
YES
if any plugin handles the request.Declaration
Objective-C
- (BOOL)application:(nonnull UIApplication *)application performFetchWithCompletionHandler: (nonnull void (^)(UIBackgroundFetchResult))completionHandler;
Swift
func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) -> Bool
-
Calls all plugins registered for
UIApplicationDelegate
callbacks in order of registration until some plugin handles the request.Declaration
Objective-C
- (BOOL)application:(nonnull UIApplication *)application continueUserActivity:(nonnull NSUserActivity *)userActivity restorationHandler: (nonnull void (^)(NSArray *_Nonnull))restorationHandler;
Swift
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]) -> Void) -> Bool
Return Value
YES
if any plugin handles the request.