Flutter iOS Embedder
FlutterPluginAppLifeCycleDelegate_internal.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_SOURCE_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_INTERNAL_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_INTERNAL_H_
7 
9 
11 
12 /**
13  * Check whether the selector should be handled dynamically.
14  */
15 - (BOOL)isSelectorAddedDynamically:(SEL)selector;
16 
17 /**
18  * Check whether there is at least one plugin responds to the selector.
19  */
20 - (BOOL)hasPluginThatRespondsToSelector:(SEL)selector;
21 
22 /**
23  * Forwards the `application:didFinishLaunchingWithOptions:` lifecycle event to plugins if they have
24  * not received it yet. This compensates for the UIScene migration, which causes storyboards (and
25  * thus the plugin registration via `FlutterImplicitEngineDelegate`) to be instantiated after the
26  * application launch events.
27  */
28 - (void)sceneFallbackDidFinishLaunchingApplication:(UIApplication*)application;
29 
30 /**
31  * Forwards the `application:willFinishLaunchingWithOptions:` lifecycle event to plugins if they
32  * have not received it yet. This compensates for the UIScene migration, which causes storyboards
33  * (and thus the plugin registration via `FlutterImplicitEngineDelegate`) to be instantiated after
34  * the application launch events.
35  */
36 - (void)sceneFallbackWillFinishLaunchingApplication:(UIApplication*)application;
37 
38 /**
39  * Forwards the application equivalent lifecycle event of
40  * `scene:willConnectToSession:options:` -> `application:didFinishLaunchingWithOptions:` to plugins
41  * that have not adopted the FlutterSceneLifeCycleDelegate protocol.
42  */
43 - (BOOL)sceneWillConnectFallback:(UISceneConnectionOptions*)connectionOptions;
44 
45 /**
46  * Forwards the application equivalent lifecycle event of
47  * `sceneWillEnterForeground:` -> `applicationWillEnterForeground:` to plugins that have not adopted
48  * the FlutterSceneLifeCycleDelegate protocol.
49  */
50 - (void)sceneWillEnterForegroundFallback;
51 
52 /**
53  * Forwards the application equivalent lifecycle event of
54  * `sceneDidBecomeActive:` -> `applicationDidBecomeActive:` to plugins that have not adopted the
55  * FlutterSceneLifeCycleDelegate protocol.
56  */
57 - (void)sceneDidBecomeActiveFallback;
58 
59 /**
60  * Forwards the application equivalent lifecycle event of
61  * `sceneWillResignActive:` -> `applicationWillResignActive:` to plugins that have not
62  * adopted the FlutterSceneLifeCycleDelegate protocol.
63  */
64 - (void)sceneWillResignActiveFallback;
65 
66 /**
67  * Forwards the application equivalent lifecycle event of
68  * `sceneDidEnterBackground:` -> `applicationDidEnterBackground:` to plugins that have not adopted
69  * the FlutterSceneLifeCycleDelegate protocol.
70  */
71 - (void)sceneDidEnterBackgroundFallback;
72 
73 /**
74  * Forwards the application equivalent lifecycle event of
75  * `scene:openURLContexts:` -> `application:openURL:options:completionHandler:` to plugins that have
76  * not adopted the FlutterSceneLifeCycleDelegate protocol.
77  */
78 - (BOOL)sceneFallbackOpenURLContexts:(NSSet<UIOpenURLContext*>*)URLContexts;
79 
80 /**
81  * Forwards the application equivalent lifecycle event of
82  * `scene:continueUserActivity:` -> `application:continueUserActivity:restorationHandler:` to
83  * plugins that have not adopted the FlutterSceneLifeCycleDelegate protocol.
84  */
85 - (BOOL)sceneFallbackContinueUserActivity:(NSUserActivity*)userActivity;
86 
87 /**
88  * Forwards the application equivalent lifecycle event of
89  * `windowScene:performActionForShortcutItem:completionHandler:` ->
90  * `application:performActionForShortcutItem:completionHandler:` to plugins that have not adopted
91  * the FlutterSceneLifeCycleDelegate protocol.
92  */
93 - (BOOL)sceneFallbackPerformActionForShortcutItem:(UIApplicationShortcutItem*)shortcutItem
94  completionHandler:(void (^)(BOOL succeeded))completionHandler;
95 
96 @end
97 ;
98 
99 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_FLUTTERPLUGINAPPLIFECYCLEDELEGATE_INTERNAL_H_