@@ -34,12 +34,14 @@ - (instancetype)init {
34
34
35
35
- (BOOL )application : (UIApplication*)application
36
36
willFinishLaunchingWithOptions : (NSDictionary *)launchOptions {
37
- return [_lifeCycleDelegate application: application willFinishLaunchingWithOptions: launchOptions];
37
+ return [self .lifeCycleDelegate application: application
38
+ willFinishLaunchingWithOptions: launchOptions];
38
39
}
39
40
40
41
- (BOOL )application : (UIApplication*)application
41
42
didFinishLaunchingWithOptions : (NSDictionary *)launchOptions {
42
- return [_lifeCycleDelegate application: application didFinishLaunchingWithOptions: launchOptions];
43
+ return [self .lifeCycleDelegate application: application
44
+ didFinishLaunchingWithOptions: launchOptions];
43
45
}
44
46
45
47
// Returns the key window's rootViewController, if it's a FlutterViewController.
@@ -79,39 +81,39 @@ - (void)applicationWillTerminate:(UIApplication*)application {
79
81
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
80
82
- (void )application : (UIApplication*)application
81
83
didRegisterUserNotificationSettings : (UIUserNotificationSettings*)notificationSettings {
82
- [_lifeCycleDelegate application: application
84
+ [self .lifeCycleDelegate application: application
83
85
didRegisterUserNotificationSettings: notificationSettings];
84
86
}
85
87
#pragma GCC diagnostic pop
86
88
87
89
- (void )application : (UIApplication*)application
88
90
didRegisterForRemoteNotificationsWithDeviceToken : (NSData *)deviceToken {
89
- [_lifeCycleDelegate application: application
91
+ [self .lifeCycleDelegate application: application
90
92
didRegisterForRemoteNotificationsWithDeviceToken: deviceToken];
91
93
}
92
94
93
95
- (void )application : (UIApplication*)application
94
96
didFailToRegisterForRemoteNotificationsWithError : (NSError *)error {
95
- [_lifeCycleDelegate application: application
97
+ [self .lifeCycleDelegate application: application
96
98
didFailToRegisterForRemoteNotificationsWithError: error];
97
99
}
98
100
99
101
#pragma GCC diagnostic push
100
102
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
101
103
- (void )application : (UIApplication*)application
102
104
didReceiveLocalNotification : (UILocalNotification*)notification {
103
- [_lifeCycleDelegate application: application didReceiveLocalNotification: notification];
105
+ [self .lifeCycleDelegate application: application didReceiveLocalNotification: notification];
104
106
}
105
107
#pragma GCC diagnostic pop
106
108
107
109
- (void )userNotificationCenter : (UNUserNotificationCenter *)center
108
110
willPresentNotification : (UNNotification *)notification
109
111
withCompletionHandler :
110
112
(void (^)(UNNotificationPresentationOptions options))completionHandler {
111
- if ([_lifeCycleDelegate respondsToSelector: _cmd ]) {
112
- [_lifeCycleDelegate userNotificationCenter: center
113
- willPresentNotification: notification
114
- withCompletionHandler: completionHandler];
113
+ if ([self .lifeCycleDelegate respondsToSelector: _cmd ]) {
114
+ [self .lifeCycleDelegate userNotificationCenter: center
115
+ willPresentNotification: notification
116
+ withCompletionHandler: completionHandler];
115
117
}
116
118
}
117
119
@@ -121,10 +123,10 @@ - (void)userNotificationCenter:(UNUserNotificationCenter*)center
121
123
- (void )userNotificationCenter : (UNUserNotificationCenter *)center
122
124
didReceiveNotificationResponse : (UNNotificationResponse *)response
123
125
withCompletionHandler : (void (^)(void ))completionHandler {
124
- if ([_lifeCycleDelegate respondsToSelector: _cmd ]) {
125
- [_lifeCycleDelegate userNotificationCenter: center
126
- didReceiveNotificationResponse: response
127
- withCompletionHandler: completionHandler];
126
+ if ([self .lifeCycleDelegate respondsToSelector: _cmd ]) {
127
+ [self .lifeCycleDelegate userNotificationCenter: center
128
+ didReceiveNotificationResponse: response
129
+ withCompletionHandler: completionHandler];
128
130
}
129
131
}
130
132
@@ -139,7 +141,7 @@ - (BOOL)isFlutterDeepLinkingEnabled {
139
141
- (BOOL )application : (UIApplication*)application
140
142
openURL : (NSURL *)url
141
143
options : (NSDictionary <UIApplicationOpenURLOptionsKey, id>*)options {
142
- if ([_lifeCycleDelegate application: application openURL: url options: options]) {
144
+ if ([self .lifeCycleDelegate application: application openURL: url options: options]) {
143
145
return YES ;
144
146
}
145
147
@@ -172,31 +174,31 @@ - (BOOL)handleOpenURL:(NSURL*)url
172
174
}
173
175
174
176
- (BOOL )application : (UIApplication*)application handleOpenURL : (NSURL *)url {
175
- return [_lifeCycleDelegate application: application handleOpenURL: url];
177
+ return [self .lifeCycleDelegate application: application handleOpenURL: url];
176
178
}
177
179
178
180
- (BOOL )application : (UIApplication*)application
179
181
openURL : (NSURL *)url
180
182
sourceApplication : (NSString *)sourceApplication
181
183
annotation : (id )annotation {
182
- return [_lifeCycleDelegate application: application
183
- openURL: url
184
- sourceApplication: sourceApplication
185
- annotation: annotation];
184
+ return [self .lifeCycleDelegate application: application
185
+ openURL: url
186
+ sourceApplication: sourceApplication
187
+ annotation: annotation];
186
188
}
187
189
188
190
- (void )application : (UIApplication*)application
189
191
performActionForShortcutItem : (UIApplicationShortcutItem*)shortcutItem
190
192
completionHandler : (void (^)(BOOL succeeded))completionHandler {
191
- [_lifeCycleDelegate application: application
192
- performActionForShortcutItem: shortcutItem
193
- completionHandler: completionHandler];
193
+ [self .lifeCycleDelegate application: application
194
+ performActionForShortcutItem: shortcutItem
195
+ completionHandler: completionHandler];
194
196
}
195
197
196
198
- (void )application : (UIApplication*)application
197
199
handleEventsForBackgroundURLSession : (nonnull NSString *)identifier
198
200
completionHandler : (nonnull void (^)())completionHandler {
199
- [_lifeCycleDelegate application: application
201
+ [self .lifeCycleDelegate application: application
200
202
handleEventsForBackgroundURLSession: identifier
201
203
completionHandler: completionHandler];
202
204
}
@@ -207,9 +209,9 @@ - (BOOL)application:(UIApplication*)application
207
209
restorationHandler :
208
210
(void (^)(NSArray <id<UIUserActivityRestoring>>* __nullable restorableObjects))
209
211
restorationHandler {
210
- if ([_lifeCycleDelegate application: application
211
- continueUserActivity: userActivity
212
- restorationHandler: restorationHandler]) {
212
+ if ([self .lifeCycleDelegate application: application
213
+ continueUserActivity: userActivity
214
+ restorationHandler: restorationHandler]) {
213
215
return YES ;
214
216
}
215
217
@@ -245,30 +247,30 @@ - (NSObject*)valuePublishedByPlugin:(NSString*)pluginKey {
245
247
#pragma mark - Selectors handling
246
248
247
249
- (void )addApplicationLifeCycleDelegate : (NSObject <FlutterApplicationLifeCycleDelegate>*)delegate {
248
- [_lifeCycleDelegate addDelegate: delegate];
250
+ [self .lifeCycleDelegate addDelegate: delegate];
249
251
}
250
252
251
253
#pragma mark - UIApplicationDelegate method dynamic implementation
252
254
253
255
- (BOOL )respondsToSelector : (SEL )selector {
254
- if ([_lifeCycleDelegate isSelectorAddedDynamically: selector]) {
256
+ if ([self .lifeCycleDelegate isSelectorAddedDynamically: selector]) {
255
257
return [self delegateRespondsSelectorToPlugins: selector];
256
258
}
257
259
return [super respondsToSelector: selector];
258
260
}
259
261
260
262
- (BOOL )delegateRespondsSelectorToPlugins : (SEL )selector {
261
- if ([_lifeCycleDelegate hasPluginThatRespondsToSelector: selector]) {
262
- return [_lifeCycleDelegate respondsToSelector: selector];
263
+ if ([self .lifeCycleDelegate hasPluginThatRespondsToSelector: selector]) {
264
+ return [self .lifeCycleDelegate respondsToSelector: selector];
263
265
} else {
264
266
return NO ;
265
267
}
266
268
}
267
269
268
270
- (id )forwardingTargetForSelector : (SEL )aSelector {
269
- if ([_lifeCycleDelegate isSelectorAddedDynamically: aSelector]) {
271
+ if ([self .lifeCycleDelegate isSelectorAddedDynamically: aSelector]) {
270
272
[self logCapabilityConfigurationWarningIfNeeded: aSelector];
271
- return _lifeCycleDelegate ;
273
+ return self. lifeCycleDelegate ;
272
274
}
273
275
return [super forwardingTargetForSelector: aSelector];
274
276
}
0 commit comments