Skip to content

Commit

Permalink
Revert "Delegate AppDelegate life-cycle callbacks to plugins via sepa…
Browse files Browse the repository at this point in the history
…rate object (flutter#5173)" (flutter#5294)

This reverts commit 597fa9e as it broke
mac engine build bot.
  • Loading branch information
aam authored May 17, 2018
1 parent 4a79400 commit 65d52d9
Show file tree
Hide file tree
Showing 10 changed files with 219 additions and 566 deletions.
2 changes: 0 additions & 2 deletions shell/platform/darwin/ios/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ _flutter_framework_headers = [
"framework/Headers/FlutterMacros.h",
"framework/Headers/FlutterNavigationController.h",
"framework/Headers/FlutterPlugin.h",
"framework/Headers/FlutterPluginAppLifeCycleDelegate.h",
"framework/Headers/FlutterTexture.h",
"framework/Headers/FlutterViewController.h",
]
Expand All @@ -44,7 +43,6 @@ shared_library("create_flutter_framework_dylib") {
"framework/Source/FlutterNavigationController.mm",
"framework/Source/FlutterPlatformPlugin.h",
"framework/Source/FlutterPlatformPlugin.mm",
"framework/Source/FlutterPluginAppLifeCycleDelegate.mm",
"framework/Source/FlutterStandardCodec.mm",
"framework/Source/FlutterStandardCodec_Internal.h",
"framework/Source/FlutterTextInputDelegate.h",
Expand Down
1 change: 0 additions & 1 deletion shell/platform/darwin/ios/framework/Headers/Flutter.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include "FlutterMacros.h"
#include "FlutterNavigationController.h"
#include "FlutterPlugin.h"
#include "FlutterPluginAppLifeCycleDelegate.h"
#include "FlutterTexture.h"
#include "FlutterViewController.h"

Expand Down
14 changes: 13 additions & 1 deletion shell/platform/darwin/ios/framework/Headers/FlutterAppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,22 @@
* code as necessary from FlutterAppDelegate.mm.
*/
FLUTTER_EXPORT
@interface FlutterAppDelegate : UIResponder<UIApplicationDelegate, FlutterPluginRegistry, FlutterAppLifeCycleProvider>
@interface FlutterAppDelegate : UIResponder<UIApplicationDelegate, FlutterPluginRegistry>

@property(strong, nonatomic) UIWindow* window;

// Can be overriden by subclasses to provide a custom FlutterBinaryMessenger,
// typically a FlutterViewController, for plugin interop.
//
// Defaults to window's rootViewController.
- (NSObject<FlutterBinaryMessenger>*)binaryMessenger;

// Can be overriden by subclasses to provide a custom FlutterTextureRegistry,
// typically a FlutterViewController, for plugin interop.
//
// Defaults to window's rootViewController.
- (NSObject<FlutterTextureRegistry>*)textures;

@end

#endif // FLUTTER_FLUTTERDARTPROJECT_H_
8 changes: 0 additions & 8 deletions shell/platform/darwin/ios/framework/Headers/FlutterPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,6 @@ NS_ASSUME_NONNULL_BEGIN
- (NSObject*)valuePublishedByPlugin:(NSString*)pluginKey;
@end

/**
Implement this in the `UIAppDelegate` of your app to enable Flutter plugins to register themselves to the application
life cycle events.
*/
@protocol FlutterAppLifeCycleProvider
- (void)addApplicationLifeCycleDelegate:(NSObject<FlutterPlugin>*)delegate;
@end

NS_ASSUME_NONNULL_END;

#endif // FLUTTER_FLUTTERPLUGIN_H_

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
#include "FlutterBinaryMessenger.h"
#include "FlutterDartProject.h"
#include "FlutterMacros.h"
#include "FlutterPlugin.h"
#include "FlutterTexture.h"

FLUTTER_EXPORT
@interface FlutterViewController : UIViewController<FlutterBinaryMessenger, FlutterTextureRegistry, FlutterPluginRegistry>
@interface FlutterViewController : UIViewController<FlutterBinaryMessenger, FlutterTextureRegistry>

- (instancetype)initWithProject:(FlutterDartProject*)project
nibName:(NSString*)nibNameOrNil
Expand Down Expand Up @@ -50,8 +49,6 @@ FLUTTER_EXPORT
*/
- (void)setInitialRoute:(NSString*)route;

- (id<FlutterPluginRegistry>)pluginRegistry;

@end

#endif // FLUTTER_FLUTTERVIEWCONTROLLER_H_
Loading

0 comments on commit 65d52d9

Please sign in to comment.