# FlutterApplicationLifeCycleDelegate

Objective-C

    @protocol FlutterApplicationLifeCycleDelegate <UNUserNotificationCenterDelegate>

Swift

    protocol FlutterApplicationLifeCycleDelegate : UNUserNotificationCenterDelegate

Protocol for listener of events from the UIApplication, typically a FlutterPlugin.

- `-application:didFinishLaunchingWithOptions:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (BOOL)application:(nonnull UIApplication *)application
          didFinishLaunchingWithOptions:(nonnull NSDictionary *)launchOptions;

  Swift

      optional func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [AnyHashable : Any] = [:]) -> Bool

  #### Return Value

  `NO` if this vetoes application launch.

- `-application:willFinishLaunchingWithOptions:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (BOOL)application:(nonnull UIApplication *)application
          willFinishLaunchingWithOptions:(nonnull NSDictionary *)launchOptions;

  Swift

      optional func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [AnyHashable : Any] = [:]) -> Bool

  #### Return Value

  `NO` if this vetoes application launch.

- `-applicationDidBecomeActive:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (void)applicationDidBecomeActive:(nonnull UIApplication *)application;

  Swift

      optional func applicationDidBecomeActive(_ application: UIApplication)

- `-applicationWillResignActive:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (void)applicationWillResignActive:(nonnull UIApplication *)application;

  Swift

      optional func applicationWillResignActive(_ application: UIApplication)

- `-applicationDidEnterBackground:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (void)applicationDidEnterBackground:(nonnull UIApplication *)application;

  Swift

      optional func applicationDidEnterBackground(_ application: UIApplication)

- `-applicationWillEnterForeground:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (void)applicationWillEnterForeground:(nonnull UIApplication *)application;

  Swift

      optional func applicationWillEnterForeground(_ application: UIApplication)

- `-applicationWillTerminate:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (void)applicationWillTerminate:(nonnull UIApplication *)application;

  Swift

      optional func applicationWillTerminate(_ application: UIApplication)

- `-application:didRegisterUserNotificationSettings:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (void)application:(nonnull UIApplication *)application
          didRegisterUserNotificationSettings:
              (nonnull UIUserNotificationSettings *)notificationSettings;

  Swift

      optional func application(_ application: UIApplication, didRegister notificationSettings: UIUserNotificationSettings)

- `-application:didRegisterForRemoteNotificationsWithDeviceToken:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (void)application:(nonnull UIApplication *)application
          didRegisterForRemoteNotificationsWithDeviceToken:
              (nonnull NSData *)deviceToken;

  Swift

      optional func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data)

- `-application:didFailToRegisterForRemoteNotificationsWithError:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (void)application:(nonnull UIApplication *)application
          didFailToRegisterForRemoteNotificationsWithError:(nonnull NSError *)error;

  Swift

      optional func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error)

- `-application:didReceiveRemoteNotification:fetchCompletionHandler:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (BOOL)application:(nonnull UIApplication *)application
          didReceiveRemoteNotification:(nonnull NSDictionary *)userInfo
                fetchCompletionHandler:
                    (nonnull void (^)(UIBackgroundFetchResult))completionHandler;

  Swift

      optional func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) -> Bool

  #### Return Value

  `YES` if this handles the request.

- `-application:didReceiveLocalNotification:`

  Calls all plugins registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (void)application:(nonnull UIApplication *)application
          didReceiveLocalNotification:(nonnull UILocalNotification *)notification;

  Swift

      optional func application(_ application: UIApplication, didReceive notification: UILocalNotification)

- `-application:openURL:options:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (BOOL)application:(nonnull UIApplication *)application
                  openURL:(nonnull NSURL *)url
                  options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey, id> *)
                              options;

  Swift

      optional func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool

  #### Return Value

  `YES` if this handles the request.

- `-application:handleOpenURL:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (BOOL)application:(nonnull UIApplication *)application
            handleOpenURL:(nonnull NSURL *)url;

  Swift

      optional func application(_ application: UIApplication, handleOpen url: URL) -> Bool

  #### Return Value

  `YES` if this handles the request.

- `-application:openURL:sourceApplication:annotation:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (BOOL)application:(nonnull UIApplication *)application
                    openURL:(nonnull NSURL *)url
          sourceApplication:(nonnull NSString *)sourceApplication
                 annotation:(nonnull id)annotation;

  Swift

      optional func application(_ application: UIApplication, open url: URL, sourceApplication: String, annotation: Any) -> Bool

  #### Return Value

  `YES` if this handles the request.

- `-application:performActionForShortcutItem:completionHandler:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (BOOL)application:(nonnull UIApplication *)application
          performActionForShortcutItem:
              (nonnull UIApplicationShortcutItem *)shortcutItem
                     completionHandler:(nonnull void (^)(BOOL))completionHandler;

  Swift

      optional func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) -> Bool

  #### Return Value

  `YES` if this handles the request.

- `-application:handleEventsForBackgroundURLSession:completionHandler:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (BOOL)application:(nonnull UIApplication *)application
          handleEventsForBackgroundURLSession:(nonnull NSString *)identifier
                            completionHandler:
                                (nonnull void (^)(void))completionHandler;

  Swift

      optional func application(_ application: UIApplication, handleEventsForBackgroundURLSession identifier: String, completionHandler: @escaping () -> Void) -> Bool

  #### Return Value

  `YES` if this handles the request.

- `-application:performFetchWithCompletionHandler:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (BOOL)application:(nonnull UIApplication *)application
          performFetchWithCompletionHandler:
              (nonnull void (^)(UIBackgroundFetchResult))completionHandler;

  Swift

      optional func application(_ application: UIApplication, performFetchWithCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) -> Bool

  #### Return Value

  `YES` if this handles the request.

- `-application:continueUserActivity:restorationHandler:`

  Called if this has been registered for `UIApplicationDelegate` callbacks.

  #### Declaration

  Objective-C

      - (BOOL)application:(nonnull UIApplication *)application
          continueUserActivity:(nonnull NSUserActivity *)userActivity
            restorationHandler:
                (nonnull void (^)(NSArray *_Nonnull))restorationHandler;

  Swift

      optional func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]) -> Void) -> Bool

  #### Return Value

  `YES` if this handles the request.

© 2023 Flutter. All rights reserved. (Last updated: 2023-03-07)

Generated by jazzy ♪♫ v0.14.3, a Realm project.