Fix iOS keyboard physical keyboard doesn't work in add to app (flutter/engine#32098)
This commit is contained in:
@@ -656,14 +656,14 @@ static void SendFakeTouchEvent(FlutterEngine* engine,
|
||||
TRACE_EVENT0("flutter", "viewDidLoad");
|
||||
|
||||
if (_engine && _engineNeedsLaunch) {
|
||||
// Register internal plugins before starting the engine.
|
||||
[self addInternalPlugins];
|
||||
|
||||
[_engine.get() launchEngine:nil libraryURI:nil entrypointArgs:nil];
|
||||
[_engine.get() setViewController:self];
|
||||
_engineNeedsLaunch = NO;
|
||||
}
|
||||
|
||||
// Register internal plugins.
|
||||
[self addInternalPlugins];
|
||||
|
||||
if ([_engine.get() viewController] == self) {
|
||||
[_engine.get() attachView];
|
||||
}
|
||||
|
||||
@@ -420,6 +420,17 @@ typedef enum UIAccessibilityContrast : NSInteger {
|
||||
}
|
||||
}
|
||||
|
||||
// Regression test for https://github.com/flutter/engine/pull/32098.
|
||||
- (void)testInternalPluginsInvokeInViewDidLoad {
|
||||
FlutterEngine* mockEngine = OCMPartialMock([[FlutterEngine alloc] init]);
|
||||
[mockEngine createShell:@"" libraryURI:@"" initialRoute:nil];
|
||||
FlutterViewController* viewController = [[FlutterViewController alloc] initWithEngine:mockEngine
|
||||
nibName:nil
|
||||
bundle:nil];
|
||||
[viewController viewDidLoad];
|
||||
OCMVerify([viewController addInternalPlugins]);
|
||||
}
|
||||
|
||||
- (void)testBinaryMessenger {
|
||||
FlutterViewController* vc = [[FlutterViewController alloc] initWithEngine:self.mockEngine
|
||||
nibName:nil
|
||||
|
||||
Reference in New Issue
Block a user