Chris Yang 59ce383ddb Fix iOS unittests leak in shared.invoke method channel that causes crash (flutter/engine#45416)
Fixes https://github.com/flutter/flutter/issues/133776

"The crash is due to testShareScreenInvoked presents the activityViewController, which prevents the engineViewController to be dealloc'd in the test: https://github.com/flutter/engine/blob/main/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm#L161C4-L161C24"

This fix stubbing the presentViewController call, which prevents the viewController being alloc'd, thus preventing the leak. It is probably sufficient for this test.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-09-05 22:08:10 +00:00
..