Flutter Engine
The Flutter Engine
FlutterPluginAppLifeCycleDelegate.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_H_
6#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_H_
7
8#import "FlutterPlugin.h"
9
11
12/**
13 * Propagates `UIAppDelegate` callbacks to registered plugins.
14 */
16@interface FlutterPluginAppLifeCycleDelegate : NSObject <UNUserNotificationCenterDelegate>
17
18/**
19 * Registers `delegate` to receive life cycle callbacks via this FlutterPluginAppLifeCycleDelegate
20 * as long as it is alive.
21 *
22 * `delegate` will only be referenced weakly.
23 */
24- (void)addDelegate:(NSObject<FlutterApplicationLifeCycleDelegate>*)delegate;
25
26/**
27 * Calls all plugins registered for `UIApplicationDelegate` callbacks.
28 *
29 * @return `NO` if any plugin vetos application launch.
30 */
31- (BOOL)application:(UIApplication*)application
32 didFinishLaunchingWithOptions:(NSDictionary*)launchOptions;
33
34/**
35 * Calls all plugins registered for `UIApplicationDelegate` callbacks.
36 *
37 * @return `NO` if any plugin vetos application launch.
38 */
39- (BOOL)application:(UIApplication*)application
40 willFinishLaunchingWithOptions:(NSDictionary*)launchOptions;
41
42/**
43 * Called if this plugin has been registered for `UIApplicationDelegate` callbacks.
44 */
45- (void)application:(UIApplication*)application
46 didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings
47 API_DEPRECATED(
48 "See -[UIApplicationDelegate application:didRegisterUserNotificationSettings:] deprecation",
49 ios(8.0, 10.0));
50
51/**
52 * Calls all plugins registered for `UIApplicationDelegate` callbacks.
53 */
54- (void)application:(UIApplication*)application
55 didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken;
56
57/**
58 * Calls all plugins registered for `UIApplicationDelegate` callbacks.
59 */
60- (void)application:(UIApplication*)application
61 didFailToRegisterForRemoteNotificationsWithError:(NSError*)error;
62
63/**
64 * Calls all plugins registered for `UIApplicationDelegate` callbacks.
65 */
66- (void)application:(UIApplication*)application
67 didReceiveRemoteNotification:(NSDictionary*)userInfo
68 fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
69
70/**
71 * Calls all plugins registered for `UIApplicationDelegate` callbacks.
72 */
73- (void)application:(UIApplication*)application
74 didReceiveLocalNotification:(UILocalNotification*)notification
75 API_DEPRECATED(
76 "See -[UIApplicationDelegate application:didReceiveLocalNotification:] deprecation",
77 ios(4.0, 10.0));
78
79/**
80 * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
81 * some plugin handles the request.
82 *
83 * @return `YES` if any plugin handles the request.
84 */
85- (BOOL)application:(UIApplication*)application
86 openURL:(NSURL*)url
87 options:(NSDictionary<UIApplicationOpenURLOptionsKey, id>*)options;
88
89/**
90 * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
91 * some plugin handles the request.
92 *
93 * @return `YES` if any plugin handles the request.
94 */
95- (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url;
96
97/**
98 * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
99 * some plugin handles the request.
100 *
101 * @return `YES` if any plugin handles the request.
102 */
103- (BOOL)application:(UIApplication*)application
104 openURL:(NSURL*)url
105 sourceApplication:(NSString*)sourceApplication
106 annotation:(id)annotation;
107
108/**
109 * Calls all plugins registered for `UIApplicationDelegate` callbacks.
110 */
111- (void)application:(UIApplication*)application
112 performActionForShortcutItem:(UIApplicationShortcutItem*)shortcutItem
113 completionHandler:(void (^)(BOOL succeeded))completionHandler
114 API_AVAILABLE(ios(9.0));
115
116/**
117 * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
118 * some plugin handles the request.
119 *
120 * @return `YES` if any plugin handles the request.
121 */
122- (BOOL)application:(UIApplication*)application
123 handleEventsForBackgroundURLSession:(nonnull NSString*)identifier
124 completionHandler:(nonnull void (^)(void))completionHandler;
125
126/**
127 * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
128 * some plugin handles the request.
129 *
130 * @returns `YES` if any plugin handles the request.
131 */
132- (BOOL)application:(UIApplication*)application
133 performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler;
134
135/**
136 * Calls all plugins registered for `UIApplicationDelegate` callbacks in order of registration until
137 * some plugin handles the request.
138 *
139 * @return `YES` if any plugin handles the request.
140 */
141- (BOOL)application:(UIApplication*)application
142 continueUserActivity:(NSUserActivity*)userActivity
143 restorationHandler:(void (^)(NSArray*))restorationHandler;
144@end
145
147
148#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_HEADERS_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_H_
#define NS_ASSUME_NONNULL_BEGIN
Definition: FlutterMacros.h:19
#define NS_ASSUME_NONNULL_END
Definition: FlutterMacros.h:20
#define FLUTTER_DARWIN_EXPORT
Definition: FlutterMacros.h:14
GAsyncResult * result
SK_API sk_sp< SkSurface > ios(9.0)
int BOOL
Definition: windows_types.h:37