Fixed nullability in plugin header and overridden type mismatch error. (flutter/engine#17532)

This commit is contained in:
gaaclarke
2020-04-06 13:23:00 -07:00
committed by GitHub
parent 25f1f346f2
commit 2190b0c3c0
2 changed files with 4 additions and 2 deletions

View File

@@ -398,7 +398,7 @@ typedef enum {
*
* @param pluginKey The unique key identifying the plugin.
*/
- (NSObject<FlutterPluginRegistrar>*)registrarForPlugin:(NSString*)pluginKey;
- (nullable NSObject<FlutterPluginRegistrar>*)registrarForPlugin:(NSString*)pluginKey;
/**
* Returns whether the specified plugin has been registered.
*

View File

@@ -8,6 +8,8 @@
#include "flutter/shell/platform/darwin/ios/framework/Headers/FlutterViewController.h"
#include "flutter/shell/platform/darwin/ios/framework/Source/FlutterPluginAppLifeCycleDelegate_internal.h"
#pragma GCC diagnostic error "-Woverriding-method-mismatch"
static NSString* kUIBackgroundMode = @"UIBackgroundModes";
static NSString* kRemoteNotificationCapabitiliy = @"remote-notification";
static NSString* kBackgroundFetchCapatibility = @"fetch";
@@ -201,7 +203,7 @@ static NSString* kBackgroundFetchCapatibility = @"fetch";
#pragma mark - Selectors handling
- (void)addApplicationLifeCycleDelegate:(NSObject<FlutterPlugin>*)delegate {
- (void)addApplicationLifeCycleDelegate:(NSObject<FlutterApplicationLifeCycleDelegate>*)delegate {
[_lifeCycleDelegate addDelegate:delegate];
}