Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
FlutterPluginAppLifeCycleDelegate Class Reference

#include <FlutterPluginAppLifeCycleDelegate.h>

Inheritance diagram for FlutterPluginAppLifeCycleDelegate:

Instance Methods

(void) - addDelegate:
 
(BOOL- application:didFinishLaunchingWithOptions:
 
(BOOL- application:willFinishLaunchingWithOptions:
 
(void) - application:didRegisterUserNotificationSettings:
 
(void) - application:didRegisterForRemoteNotificationsWithDeviceToken:
 
(void) - application:didFailToRegisterForRemoteNotificationsWithError:
 
(void) - application:didReceiveRemoteNotification:fetchCompletionHandler:
 
(void) - application:didReceiveLocalNotification:
 
(BOOL- application:openURL:options:
 
(BOOL- application:handleOpenURL:
 
(BOOL- application:openURL:sourceApplication:annotation:
 
(void) - application:performActionForShortcutItem:completionHandler:
 
(BOOL- application:handleEventsForBackgroundURLSession:completionHandler:
 
(BOOL- application:performFetchWithCompletionHandler:
 
(BOOL- application:continueUserActivity:restorationHandler:
 

Detailed Description

Propagates UIAppDelegate callbacks to registered plugins.

Definition at line 16 of file FlutterPluginAppLifeCycleDelegate.h.

Method Documentation

◆ addDelegate:

- (void) addDelegate: (NSObject<FlutterApplicationLifeCycleDelegate>*)  delegate

Registers delegate to receive life cycle callbacks via this FlutterPluginAppLifeCycleDelegate as long as it is alive.

delegate will only be referenced weakly.

Definition at line 71 of file FlutterPluginAppLifeCycleDelegate.mm.

114 :(NSObject<FlutterApplicationLifeCycleDelegate>*)delegate {
115 [_delegates addPointer:(__bridge void*)delegate];
116 if (IsPowerOfTwo([_delegates count])) {
117 [_delegates compact];
118 }
119}
NSPointerArray * _delegates

References x.

◆ application:continueUserActivity:restorationHandler:

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

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.

Definition at line 536 of file FlutterPluginAppLifeCycleDelegate.mm.

664 :(UIApplication*)application
665 continueUserActivity:(NSUserActivity*)userActivity
666 restorationHandler:(void (^)(NSArray*))restorationHandler {
667 return [self application:application
668 continueUserActivity:userActivity
669 restorationHandler:restorationHandler
670 isFallbackForScene:NO];
671}

◆ application:didFailToRegisterForRemoteNotificationsWithError:

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

Calls all plugins registered for UIApplicationDelegate callbacks.

Definition at line 203 of file FlutterPluginAppLifeCycleDelegate.mm.

423 :(UIApplication*)application
424 didFailToRegisterForRemoteNotificationsWithError:(NSError*)error {
425 for (NSObject<FlutterApplicationLifeCycleDelegate>* delegate in _delegates.allObjects) {
426 if (!delegate) {
427 continue;
428 }
429 if ([delegate respondsToSelector:_cmd]) {
430 [delegate application:application didFailToRegisterForRemoteNotificationsWithError:error];
431 }
432 }
433}
const uint8_t uint32_t uint32_t GError ** error

◆ application:didFinishLaunchingWithOptions:

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

Calls all plugins registered for UIApplicationDelegate callbacks.

Returns
NO if any plugin vetos application launch.

Definition at line 71 of file FlutterPluginAppLifeCycleDelegate.mm.

146 :(UIApplication*)application
147 didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
148 if (_delegates.count > 0) {
149 self.didForwardApplicationDidLaunch = YES;
150 }
151 return [self application:application
152 didFinishLaunchingWithOptions:launchOptions
153 isFallbackForScene:NO];
154}
if(engine==nullptr)

◆ application:didReceiveLocalNotification:

- (void) application: (UIApplication *)  application
didReceiveLocalNotification: ("See - deprecation")  [UIApplicationDelegate application:didReceiveLocalNotification:]
(ios(4.0, 10.0))  API_DEPRECATED 

Calls all plugins registered for UIApplicationDelegate callbacks.

◆ application:didReceiveRemoteNotification:fetchCompletionHandler:

- (void) application: (UIApplication*)  application
didReceiveRemoteNotification: (NSDictionary*)  userInfo
fetchCompletionHandler: (void(^)(UIBackgroundFetchResult result))  completionHandler 

Calls all plugins registered for UIApplicationDelegate callbacks.

Definition at line 203 of file FlutterPluginAppLifeCycleDelegate.mm.

435 :(UIApplication*)application
436 didReceiveRemoteNotification:(NSDictionary*)userInfo
437 fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler {
438 for (NSObject<FlutterApplicationLifeCycleDelegate>* delegate in _delegates.allObjects) {
439 if (!delegate) {
440 continue;
441 }
442 if ([delegate respondsToSelector:_cmd]) {
443 if ([delegate application:application
444 didReceiveRemoteNotification:userInfo
445 fetchCompletionHandler:completionHandler]) {
446 return;
447 }
448 }
449 }
450}

◆ application:didRegisterForRemoteNotificationsWithDeviceToken:

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

Calls all plugins registered for UIApplicationDelegate callbacks.

Definition at line 203 of file FlutterPluginAppLifeCycleDelegate.mm.

410 :(UIApplication*)application
411 didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken {
412 for (NSObject<FlutterApplicationLifeCycleDelegate>* delegate in _delegates.allObjects) {
413 if (!delegate) {
414 continue;
415 }
416 if ([delegate respondsToSelector:_cmd]) {
417 [delegate application:application
418 didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
419 }
420 }
421}

◆ application:didRegisterUserNotificationSettings:

- (void) application: (UIApplication *)  application
didRegisterUserNotificationSettings: ("See - deprecation")  [UIApplicationDelegate application:didRegisterUserNotificationSettings:]
(ios(8.0, 10.0))  API_DEPRECATED 

Called if this plugin has been registered for UIApplicationDelegate callbacks.

◆ application:handleEventsForBackgroundURLSession:completionHandler:

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

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.

◆ application:handleOpenURL:

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

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.

Definition at line 536 of file FlutterPluginAppLifeCycleDelegate.mm.

555 :(UIApplication*)application handleOpenURL:(NSURL*)url {
556 for (NSObject<FlutterApplicationLifeCycleDelegate>* delegate in _delegates.allObjects) {
557 if (!delegate) {
558 continue;
559 }
560 if ([delegate respondsToSelector:_cmd]) {
561 if ([delegate application:application handleOpenURL:url]) {
562 return YES;
563 }
564 }
565 }
566 return NO;
567}

◆ application:openURL:options:

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

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.

Definition at line 203 of file FlutterPluginAppLifeCycleDelegate.mm.

492 :(UIApplication*)application
493 openURL:(NSURL*)url
494 options:(NSDictionary<UIApplicationOpenURLOptionsKey, id>*)options {
495 return [self application:application openURL:url options:options isFallbackForScene:NO];
496}
const uintptr_t id

◆ application:openURL:sourceApplication:annotation:

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

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.

Definition at line 536 of file FlutterPluginAppLifeCycleDelegate.mm.

569 :(UIApplication*)application
570 openURL:(NSURL*)url
571 sourceApplication:(NSString*)sourceApplication
572 annotation:(id)annotation {
573 for (NSObject<FlutterApplicationLifeCycleDelegate>* delegate in _delegates.allObjects) {
574 if (!delegate) {
575 continue;
576 }
577 if ([delegate respondsToSelector:_cmd]) {
578 if ([delegate application:application
579 openURL:url
580 sourceApplication:sourceApplication
581 annotation:annotation]) {
582 return YES;
583 }
584 }
585 }
586 return NO;
587}

◆ application:performActionForShortcutItem:completionHandler:

- (void) application: (UIApplication *)  application
performActionForShortcutItem: (UIApplicationShortcutItem *)  shortcutItem
completionHandler: (ios(9.0))  API_AVAILABLE 

Calls all plugins registered for UIApplicationDelegate callbacks.

◆ application:performFetchWithCompletionHandler:

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

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.

Definition at line 536 of file FlutterPluginAppLifeCycleDelegate.mm.

649 :(UIApplication*)application
650 performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler {
651 for (NSObject<FlutterApplicationLifeCycleDelegate>* delegate in _delegates.allObjects) {
652 if (!delegate) {
653 continue;
654 }
655 if ([delegate respondsToSelector:_cmd]) {
656 if ([delegate application:application performFetchWithCompletionHandler:completionHandler]) {
657 return YES;
658 }
659 }
660 }
661 return NO;
662}

◆ application:willFinishLaunchingWithOptions:

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

Calls all plugins registered for UIApplicationDelegate callbacks.

Returns
NO if any plugin vetos application launch.

Definition at line 203 of file FlutterPluginAppLifeCycleDelegate.mm.

222 :(UIApplication*)application
223 willFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
224 if (_delegates.count > 0) {
225 self.didForwardApplicationWillLaunch = YES;
226 }
228 for (NSObject<FlutterApplicationLifeCycleDelegate>* delegate in _delegates.allObjects) {
229 if (!delegate) {
230 continue;
231 }
232 if ([delegate respondsToSelector:_cmd]) {
233 if (![delegate application:application willFinishLaunchingWithOptions:launchOptions]) {
234 return NO;
235 }
236 }
237 }
238 return YES;
239}

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