Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Instance Methods | Protected Attributes | Properties | List of all members
FlutterAppDelegate Class Reference

#include <FlutterAppDelegate.h>

Inheritance diagram for FlutterAppDelegate:
<FlutterAppLifecycleProvider> AppDelegate

Instance Methods

(instancetype) - init [implementation]
 
(void) - dealloc [implementation]
 
(BOOL- application:willFinishLaunchingWithOptions: [implementation]
 
(BOOL- application:didFinishLaunchingWithOptions: [implementation]
 
(FlutterViewController *) - rootFlutterViewController [implementation]
 
(void) - applicationDidEnterBackground: [implementation]
 
(void) - applicationWillEnterForeground: [implementation]
 
(void) - applicationWillResignActive: [implementation]
 
(void) - applicationDidBecomeActive: [implementation]
 
(void) - applicationWillTerminate: [implementation]
 
(void) - application:didRegisterUserNotificationSettings: [implementation]
 
(void) - application:didRegisterForRemoteNotificationsWithDeviceToken: [implementation]
 
(void) - application:didFailToRegisterForRemoteNotificationsWithError: [implementation]
 
(void) - application:didReceiveLocalNotification: [implementation]
 
(void) - userNotificationCenter:willPresentNotification:withCompletionHandler: [implementation]
 
(void) - userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler: [implementation]
 
(BOOL- openURL: [implementation]
 
(BOOL- application:openURL:options: [implementation]
 
(BOOL- application:handleOpenURL: [implementation]
 
(BOOL- application:openURL:sourceApplication:annotation: [implementation]
 
(void) - application:performActionForShortcutItem:completionHandler: [implementation]
 
(void) - application:handleEventsForBackgroundURLSession:completionHandler: [implementation]
 
(BOOL- application:continueUserActivity:restorationHandler: [implementation]
 
(NSObject< FlutterPluginRegistrar > *) - registrarForPlugin: [implementation]
 
(BOOL- hasPlugin: [implementation]
 
(NSObject *) - valuePublishedByPlugin: [implementation]
 
(void) - addApplicationLifeCycleDelegate: [implementation]
 
(BOOL- respondsToSelector: [implementation]
 
(BOOL- delegateRespondsSelectorToPlugins: [implementation]
 
(id- forwardingTargetForSelector: [implementation]
 
(void) - logCapabilityConfigurationWarningIfNeeded: [implementation]
 
(BOOL- application:shouldSaveApplicationState: [implementation]
 
(BOOL- application:shouldRestoreApplicationState: [implementation]
 
(BOOL- application:shouldSaveSecureApplicationState: [implementation]
 
(BOOL- application:shouldRestoreSecureApplicationState: [implementation]
 
(int64_t) - lastAppModificationTime [implementation]
 
(void) - applicationWillFinishLaunching: [implementation]
 
(void) - addApplicationLifecycleDelegate: [implementation]
 
(void) - removeApplicationLifecycleDelegate: [implementation]
 
(NSString *) - applicationName [implementation]
 
(void) - application:openURLs: [implementation]
 
(NSApplicationTerminateReply) - applicationShouldTerminate: [implementation]
 
- Instance Methods inherited from <FlutterAppLifecycleProvider>
(void) - addApplicationLifecycleDelegate:
 
(void) - removeApplicationLifecycleDelegate:
 

Protected Attributes

 : UIResponder <UIApplicationDelegate
 
 FlutterPluginRegistry
 

Properties

FlutterAppLifeCycleProvider UIWindow * window
 
IBOutlet NSMenu * applicationMenu
 
IBOutlet NSWindow * mainFlutterWindow
 
FlutterViewController *(^ rootFlutterViewControllerGetter )(void) [implementation]
 
FlutterAppLifecycleRegistrarlifecycleRegistrar [implementation]
 
FlutterEngineTerminationHandlerterminationHandler [implementation]
 

Detailed Description

UIApplicationDelegate subclass for simple apps that want default behavior.

This class implements the following behaviors:

App delegates for Flutter applications are not required to inherit from this class. Developers of custom app delegate classes should copy and paste code as necessary from FlutterAppDelegate.mm.

|NSApplicationDelegate| subclass for simple apps that want default behavior.

This class implements the following behaviors:

App delegates for Flutter applications are not required to inherit from this class. Developers of custom app delegate classes should copy and paste code as necessary from FlutterAppDelegate.mm.

Definition at line 27 of file FlutterAppDelegate.h.

Method Documentation

◆ addApplicationLifeCycleDelegate:

- (void) addApplicationLifeCycleDelegate: (NSObject<FlutterApplicationLifeCycleDelegate>*)  delegate
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

248 :(NSObject<FlutterApplicationLifeCycleDelegate>*)delegate {
249 [_lifeCycleDelegate addDelegate:delegate];
250}

◆ addApplicationLifecycleDelegate:

- (void) addApplicationLifecycleDelegate: (NSObject<FlutterAppLifecycleDelegate>*)  delegate
implementation

Definition at line 22 of file FlutterAppDelegate.mm.

47 :(NSObject<FlutterAppLifecycleDelegate>*)delegate {
48 [self.lifecycleRegistrar addDelegate:delegate];
49}

◆ application:continueUserActivity:restorationHandler:

- (BOOL) application: (UIApplication*)  application
continueUserActivity: (NSUserActivity*)  userActivity
restorationHandler: (void(^)(NSArray<id<UIUserActivityRestoring>>* __nullable restorableObjects))  restorationHandler 
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

207 :(UIApplication*)application
208 continueUserActivity:(NSUserActivity*)userActivity
209 restorationHandler:
210 (void (^)(NSArray<id<UIUserActivityRestoring>>* __nullable restorableObjects))
211 restorationHandler {
212 if ([_lifeCycleDelegate application:application
213 continueUserActivity:userActivity
214 restorationHandler:restorationHandler]) {
215 return YES;
216 }
217 return [self openURL:userActivity.webpageURL];
218}
if(end==-1)
const uintptr_t id

◆ application:didFailToRegisterForRemoteNotificationsWithError:

- (void) application: (UIApplication*)  application
didFailToRegisterForRemoteNotificationsWithError: (NSError*)  error 
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

99 :(UIApplication*)application
100 didFailToRegisterForRemoteNotificationsWithError:(NSError*)error {
101 [_lifeCycleDelegate application:application
102 didFailToRegisterForRemoteNotificationsWithError:error];
103}
const uint8_t uint32_t uint32_t GError ** error

◆ application:didFinishLaunchingWithOptions:

- (BOOL) application: (UIApplication*)  application
didFinishLaunchingWithOptions: (NSDictionary*)  launchOptions 
implementation

Reimplemented in AppDelegate.

Definition at line 20 of file FlutterAppDelegate.mm.

46 :(UIApplication*)application
47 didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
48 return [_lifeCycleDelegate application:application didFinishLaunchingWithOptions:launchOptions];
49}

◆ application:didReceiveLocalNotification:

- (void) application: (UIApplication*)  application
didReceiveLocalNotification: (UILocalNotification*)  notification 
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

107 :(UIApplication*)application
108 didReceiveLocalNotification:(UILocalNotification*)notification {
109 [_lifeCycleDelegate application:application didReceiveLocalNotification:notification];
110}

◆ application:didRegisterForRemoteNotificationsWithDeviceToken:

- (void) application: (UIApplication*)  application
didRegisterForRemoteNotificationsWithDeviceToken: (NSData*)  deviceToken 
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

93 :(UIApplication*)application
94 didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken {
95 [_lifeCycleDelegate application:application
96 didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
97}

◆ application:didRegisterUserNotificationSettings:

- (void) application: (UIApplication*)  application
didRegisterUserNotificationSettings: (UIUserNotificationSettings*)  notificationSettings 
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

86 :(UIApplication*)application
87 didRegisterUserNotificationSettings:(UIUserNotificationSettings*)notificationSettings {
88 [_lifeCycleDelegate application:application
89 didRegisterUserNotificationSettings:notificationSettings];
90}

◆ application:handleEventsForBackgroundURLSession:completionHandler:

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

Definition at line 20 of file FlutterAppDelegate.mm.

199 :(UIApplication*)application
200 handleEventsForBackgroundURLSession:(nonnull NSString*)identifier
201 completionHandler:(nonnull void (^)())completionHandler {
202 [_lifeCycleDelegate application:application
203 handleEventsForBackgroundURLSession:identifier
204 completionHandler:completionHandler];
205}
static SkString identifier(const FontFamilyDesc &family, const FontDesc &font)

◆ application:handleOpenURL:

- (BOOL) application: (UIApplication*)  application
handleOpenURL: (NSURL*)  url 
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

177 :(UIApplication*)application handleOpenURL:(NSURL*)url {
178 return [_lifeCycleDelegate application:application handleOpenURL:url];
179}

◆ application:openURL:options:

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

Definition at line 20 of file FlutterAppDelegate.mm.

168 :(UIApplication*)application
169 openURL:(NSURL*)url
170 options:(NSDictionary<UIApplicationOpenURLOptionsKey, id>*)options {
171 if ([_lifeCycleDelegate application:application openURL:url options:options]) {
172 return YES;
173 }
174 return [self openURL:url];
175}
const char * options

◆ application:openURL:sourceApplication:annotation:

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

Definition at line 20 of file FlutterAppDelegate.mm.

181 :(UIApplication*)application
182 openURL:(NSURL*)url
183 sourceApplication:(NSString*)sourceApplication
184 annotation:(id)annotation {
185 return [_lifeCycleDelegate application:application
186 openURL:url
187 sourceApplication:sourceApplication
188 annotation:annotation];
189}

◆ application:openURLs:

- (void) application: (NSApplication*)  application
openURLs: (NSArray<NSURL*>*)  urls 
implementation

Definition at line 22 of file FlutterAppDelegate.mm.

68 :(NSApplication*)application openURLs:(NSArray<NSURL*>*)urls {
69 for (NSObject<FlutterAppLifecycleDelegate>* delegate in self.lifecycleRegistrar.delegates) {
70 if ([delegate respondsToSelector:@selector(handleOpenURLs:)] &&
71 [delegate handleOpenURLs:urls]) {
72 return;
73 }
74 }
75}
FlutterAppLifecycleRegistrar * lifecycleRegistrar
for(int row=0;row< height;++row)

◆ application:performActionForShortcutItem:completionHandler:

- (void) application: (UIApplication*)  application
performActionForShortcutItem: (UIApplicationShortcutItem*)  shortcutItem
completionHandler: (void(^)(BOOL succeeded))  completionHandler 
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

191 :(UIApplication*)application
192 performActionForShortcutItem:(UIApplicationShortcutItem*)shortcutItem
193 completionHandler:(void (^)(BOOL succeeded))completionHandler {
194 [_lifeCycleDelegate application:application
195 performActionForShortcutItem:shortcutItem
196 completionHandler:completionHandler];
197}
int BOOL

◆ application:shouldRestoreApplicationState:

- (BOOL) application: (UIApplication*)  application
shouldRestoreApplicationState: (NSCoder*)  coder 
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

309 :(UIApplication*)application shouldRestoreApplicationState:(NSCoder*)coder {
310 int64_t stateDate = [coder decodeInt64ForKey:kRestorationStateAppModificationKey];
311 return self.lastAppModificationTime == stateDate;
312}
static NSString *const kRestorationStateAppModificationKey

◆ application:shouldRestoreSecureApplicationState:

- (BOOL) application: (UIApplication*)  application
shouldRestoreSecureApplicationState: (NSCoder*)  coder 
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

319 :(UIApplication*)application
320 shouldRestoreSecureApplicationState:(NSCoder*)coder {
321 int64_t stateDate = [coder decodeInt64ForKey:kRestorationStateAppModificationKey];
322 return self.lastAppModificationTime == stateDate;
323}

◆ application:shouldSaveApplicationState:

- (BOOL) application: (UIApplication*)  application
shouldSaveApplicationState: (NSCoder*)  coder 
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

304 :(UIApplication*)application shouldSaveApplicationState:(NSCoder*)coder {
306 return YES;
307}

◆ application:shouldSaveSecureApplicationState:

- (BOOL) application: (UIApplication*)  application
shouldSaveSecureApplicationState: (NSCoder*)  coder 
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

314 :(UIApplication*)application shouldSaveSecureApplicationState:(NSCoder*)coder {
316 return YES;
317}

◆ application:willFinishLaunchingWithOptions:

- (BOOL) application: (UIApplication*)  application
willFinishLaunchingWithOptions: (NSDictionary*)  launchOptions 
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

41 :(UIApplication*)application
42 willFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
43 return [_lifeCycleDelegate application:application willFinishLaunchingWithOptions:launchOptions];
44}

◆ applicationDidBecomeActive:

- (void) applicationDidBecomeActive: (UIApplication*)  application
implementation

Reimplemented in AppDelegate.

Definition at line 20 of file FlutterAppDelegate.mm.

77 :(UIApplication*)application {
78}

◆ applicationDidEnterBackground:

- (void) applicationDidEnterBackground: (UIApplication*)  application
implementation

Reimplemented in AppDelegate.

Definition at line 20 of file FlutterAppDelegate.mm.

65 :(UIApplication*)application {
66}

◆ applicationName

- (NSString *) applicationName
implementation

Returns the display name of the application as set in the Info.plist.

Definition at line 22 of file FlutterAppDelegate.mm.

57 {
58 NSString* applicationName =
59 [NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleDisplayName"];
60 if (!applicationName) {
61 applicationName = [NSBundle.mainBundle objectForInfoDictionaryKey:@"CFBundleName"];
62 }
63 return applicationName;
64}

◆ applicationShouldTerminate:

- (NSApplicationTerminateReply) applicationShouldTerminate: (NSApplication* _Nonnull)  sender
implementation

Definition at line 22 of file FlutterAppDelegate.mm.

77 :(NSApplication* _Nonnull)sender {
78 // If the framework has already told us to terminate, terminate immediately.
79 if ([self terminationHandler] == nil || [[self terminationHandler] shouldTerminate]) {
80 return NSTerminateNow;
81 }
82
83 // Send a termination request to the framework.
84 FlutterEngineTerminationHandler* terminationHandler = [self terminationHandler];
85 [terminationHandler requestApplicationTermination:sender
86 exitType:kFlutterAppExitTypeCancelable
87 result:nil];
88
89 // Cancel termination to allow the framework to handle the request asynchronously. When the
90 // termination request returns from the app, if termination is desired, this method will be
91 // reinvoked with self.terminationHandler.shouldTerminate set to YES.
92 return NSTerminateCancel;
93}
void requestApplicationTermination:exitType:result:(NSApplication *sender,[exitType] FlutterAppExitType type,[result] nullable FlutterResult result)
FlutterEngineTerminationHandler * terminationHandler

◆ applicationWillEnterForeground:

- (void) applicationWillEnterForeground: (UIApplication*)  application
implementation

Reimplemented in AppDelegate.

Definition at line 20 of file FlutterAppDelegate.mm.

69 :(UIApplication*)application {
70}

◆ applicationWillFinishLaunching:

- (void) applicationWillFinishLaunching: (NSNotification*)  notification
implementation

Definition at line 22 of file FlutterAppDelegate.mm.

35 :(NSNotification*)notification {
36 // Update UI elements to match the application name.
37 NSString* applicationName = [self applicationName];
38 _mainFlutterWindow.title = applicationName;
39 for (NSMenuItem* menuItem in _applicationMenu.itemArray) {
40 menuItem.title = [menuItem.title stringByReplacingOccurrencesOfString:@"APP_NAME"
41 withString:applicationName];
42 }
43}

◆ applicationWillResignActive:

- (void) applicationWillResignActive: (UIApplication*)  application
implementation

Reimplemented in AppDelegate.

Definition at line 20 of file FlutterAppDelegate.mm.

73 :(UIApplication*)application {
74}

◆ applicationWillTerminate:

- (void) applicationWillTerminate: (UIApplication*)  application
implementation

Reimplemented in AppDelegate.

Definition at line 20 of file FlutterAppDelegate.mm.

81 :(UIApplication*)application {
82}

◆ dealloc

- (void) dealloc
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

34 {
35 [_lifeCycleDelegate release];
36 [_rootFlutterViewControllerGetter release];
37 [_window release];
38 [super dealloc];
39}

◆ delegateRespondsSelectorToPlugins:

- (BOOL) delegateRespondsSelectorToPlugins: (SEL)  selector
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

261 :(SEL)selector {
262 if ([_lifeCycleDelegate hasPluginThatRespondsToSelector:selector]) {
263 return [_lifeCycleDelegate respondsToSelector:selector];
264 } else {
265 return NO;
266 }
267}

◆ forwardingTargetForSelector:

- (id) forwardingTargetForSelector: (SEL)  aSelector
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

269 :(SEL)aSelector {
270 if ([_lifeCycleDelegate isSelectorAddedDynamically:aSelector]) {
271 [self logCapabilityConfigurationWarningIfNeeded:aSelector];
272 return _lifeCycleDelegate;
273 }
274 return [super forwardingTargetForSelector:aSelector];
275}

◆ hasPlugin:

- (BOOL) hasPlugin: (NSString*)  pluginKey
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

230 :(NSString*)pluginKey {
231 FlutterViewController* flutterRootViewController = [self rootFlutterViewController];
232 if (flutterRootViewController) {
233 return [[flutterRootViewController pluginRegistry] hasPlugin:pluginKey];
234 }
235 return false;
236}
id< FlutterPluginRegistry > pluginRegistry()

◆ init

- (instancetype) init
implementation

Reimplemented in AppDelegate.

Definition at line 20 of file FlutterAppDelegate.mm.

27 {
28 if (self = [super init]) {
29 _lifeCycleDelegate = [[FlutterPluginAppLifeCycleDelegate alloc] init];
30 }
31 return self;
32}

◆ lastAppModificationTime

- (int64_t) lastAppModificationTime
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

325 {
326 NSDate* fileDate;
327 NSError* error = nil;
328 [[[NSBundle mainBundle] executableURL] getResourceValue:&fileDate
329 forKey:NSURLContentModificationDateKey
330 error:&error];
331 NSAssert(error == nil, @"Cannot obtain modification date of main bundle: %@", error);
332 return [fileDate timeIntervalSince1970];
333}

◆ logCapabilityConfigurationWarningIfNeeded:

- (void) logCapabilityConfigurationWarningIfNeeded: (SEL)  selector
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

281 :(SEL)selector {
282 NSArray* backgroundModesArray =
283 [[NSBundle mainBundle] objectForInfoDictionaryKey:kUIBackgroundMode];
284 NSSet* backgroundModesSet = [[[NSSet alloc] initWithArray:backgroundModesArray] autorelease];
285 if (selector == @selector(application:didReceiveRemoteNotification:fetchCompletionHandler:)) {
286 if (![backgroundModesSet containsObject:kRemoteNotificationCapabitiliy]) {
287 NSLog(
288 @"You've implemented -[<UIApplicationDelegate> "
289 @"application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need "
290 @"to add \"remote-notification\" to the list of your supported UIBackgroundModes in your "
291 @"Info.plist.");
292 }
293 } else if (selector == @selector(application:performFetchWithCompletionHandler:)) {
294 if (![backgroundModesSet containsObject:kBackgroundFetchCapatibility]) {
295 NSLog(@"You've implemented -[<UIApplicationDelegate> "
296 @"application:performFetchWithCompletionHandler:], but you still need to add \"fetch\" "
297 @"to the list of your supported UIBackgroundModes in your Info.plist.");
298 }
299 }
300}
static NSString *const kRemoteNotificationCapabitiliy
static NSString *const kBackgroundFetchCapatibility

◆ openURL:

- (BOOL) openURL: (NSURL*)  url
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

137 :(NSURL*)url {
138 NSNumber* isDeepLinkingEnabled =
139 [[NSBundle mainBundle] objectForInfoDictionaryKey:@"FlutterDeepLinkingEnabled"];
140 if (!isDeepLinkingEnabled.boolValue) {
141 // Not set or NO.
142 return NO;
143 } else {
144 FlutterViewController* flutterViewController = [self rootFlutterViewController];
145 if (flutterViewController) {
146 [flutterViewController.engine
147 waitForFirstFrame:3.0
148 callback:^(BOOL didTimeout) {
149 if (didTimeout) {
150 FML_LOG(ERROR)
151 << "Timeout waiting for the first frame when launching an URL.";
152 } else {
153 [flutterViewController.engine.navigationChannel
154 invokeMethod:@"pushRouteInformation"
155 arguments:@{
156 @"location" : url.absoluteString ?: [NSNull null],
157 }];
158 }
159 }];
160 return YES;
161 } else {
162 FML_LOG(ERROR) << "Attempting to open an URL without a Flutter RootViewController.";
163 return NO;
164 }
165 }
166}
#define FML_LOG(severity)
Definition logging.h:82
#define ERROR(message)

◆ registrarForPlugin:

- (NSObject< FlutterPluginRegistrar > *) registrarForPlugin: (NSString*)  pluginKey
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

222 :(NSString*)pluginKey {
223 FlutterViewController* flutterRootViewController = [self rootFlutterViewController];
224 if (flutterRootViewController) {
225 return [[flutterRootViewController pluginRegistry] registrarForPlugin:pluginKey];
226 }
227 return nil;
228}

◆ removeApplicationLifecycleDelegate:

- (void) removeApplicationLifecycleDelegate: (NSObject<FlutterAppLifecycleDelegate>*)  delegate
implementation

Definition at line 22 of file FlutterAppDelegate.mm.

51 :(NSObject<FlutterAppLifecycleDelegate>*)delegate {
52 [self.lifecycleRegistrar removeDelegate:delegate];
53}

◆ respondsToSelector:

- (BOOL) respondsToSelector: (SEL)  selector
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

254 :(SEL)selector {
255 if ([_lifeCycleDelegate isSelectorAddedDynamically:selector]) {
256 return [self delegateRespondsSelectorToPlugins:selector];
257 }
258 return [super respondsToSelector:selector];
259}

◆ rootFlutterViewController

- (FlutterViewController *) rootFlutterViewController
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

53 {
54 if (_rootFlutterViewControllerGetter != nil) {
55 return _rootFlutterViewControllerGetter();
56 }
57 UIViewController* rootViewController = _window.rootViewController;
58 if ([rootViewController isKindOfClass:[FlutterViewController class]]) {
59 return (FlutterViewController*)rootViewController;
60 }
61 return nil;
62}

◆ userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:

- (void) userNotificationCenter: (UNUserNotificationCenter*)  center
didReceiveNotificationResponse: (UNNotificationResponse*)  response
withCompletionHandler: (void(^)(void))  completionHandler 
implementation

Calls all plugins registered for UNUserNotificationCenterDelegate callbacks.

Definition at line 20 of file FlutterAppDelegate.mm.

127 :(UNUserNotificationCenter*)center
128 didReceiveNotificationResponse:(UNNotificationResponse*)response
129 withCompletionHandler:(void (^)(void))completionHandler {
130 if ([_lifeCycleDelegate respondsToSelector:_cmd]) {
131 [_lifeCycleDelegate userNotificationCenter:center
132 didReceiveNotificationResponse:response
133 withCompletionHandler:completionHandler];
134 }
135}
static SkScalar center(float pos0, float pos1)

◆ userNotificationCenter:willPresentNotification:withCompletionHandler:

- (void) userNotificationCenter: (UNUserNotificationCenter*)  center
willPresentNotification: (UNNotification*)  notification
withCompletionHandler: (void(^)(UNNotificationPresentationOptions options))  completionHandler 
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

113 :(UNUserNotificationCenter*)center
114 willPresentNotification:(UNNotification*)notification
115 withCompletionHandler:
116 (void (^)(UNNotificationPresentationOptions options))completionHandler {
117 if ([_lifeCycleDelegate respondsToSelector:_cmd]) {
118 [_lifeCycleDelegate userNotificationCenter:center
119 willPresentNotification:notification
120 withCompletionHandler:completionHandler];
121 }
122}

◆ valuePublishedByPlugin:

- (NSObject *) valuePublishedByPlugin: (NSString*)  pluginKey
implementation

Definition at line 20 of file FlutterAppDelegate.mm.

238 :(NSString*)pluginKey {
239 FlutterViewController* flutterRootViewController = [self rootFlutterViewController];
240 if (flutterRootViewController) {
241 return [[flutterRootViewController pluginRegistry] valuePublishedByPlugin:pluginKey];
242 }
243 return nil;
244}

Member Data Documentation

◆ __pad0__

- __pad0__
protected

Definition at line 26 of file FlutterAppDelegate.h.

◆ FlutterPluginRegistry

- FlutterPluginRegistry
protected

Definition at line 28 of file FlutterAppDelegate.h.

Property Documentation

◆ applicationMenu

- (IBOutlet NSMenu*) applicationMenu
readwritenonatomicweak

The application menu in the menu bar.

Definition at line 59 of file FlutterAppDelegate.h.

◆ lifecycleRegistrar

- (FlutterAppLifecycleRegistrar*) lifecycleRegistrar
readwritenonatomicassignimplementation

Provided by category FlutterAppDelegate().

Definition at line 22 of file FlutterAppDelegate.mm.

◆ mainFlutterWindow

- (IBOutlet NSWindow*) mainFlutterWindow
readwritenonatomicweak

The primary application window containing a FlutterViewController. This is primarily intended for use in single-window applications.

Definition at line 65 of file FlutterAppDelegate.h.

◆ rootFlutterViewControllerGetter

- (FlutterViewController *(^ rootFlutterViewControllerGetter) (void))
readwritenonatomiccopyimplementation

Provided by category FlutterAppDelegate(Test).

◆ terminationHandler

- (FlutterEngineTerminationHandler*) terminationHandler
readwriteatomicweakimplementation

Holds a weak reference to the termination handler owned by the engine. Called by the |FlutterApplication| when termination is requested by the OS.

Provided by category FlutterAppDelegate().

Definition at line 17 of file FlutterAppDelegate_Internal.h.

◆ window

- (FlutterAppLifeCycleProvider UIWindow*) window
readwritenonatomicstrong

Definition at line 30 of file FlutterAppDelegate.h.


The documentation for this class was generated from the following files: