diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index 26dd053566..2102d68456 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -62,7 +62,7 @@ class PlatformMessageResponseDarwin : public blink::PlatformMessageResponse { UIStatusBarStyle _statusBarStyle; blink::ViewportMetrics _viewportMetrics; shell::TouchMapper _touchMapper; - std::unique_ptr _platformView; + std::shared_ptr _platformView; fml::scoped_nsprotocol _platformPlugin; fml::scoped_nsprotocol _textInputPlugin; fml::scoped_nsprotocol _localizationChannel; @@ -119,7 +119,7 @@ class PlatformMessageResponseDarwin : public blink::PlatformMessageResponse { _orientationPreferences = UIInterfaceOrientationMaskAll; _statusBarStyle = UIStatusBarStyleDefault; _platformView = - std::make_unique(reinterpret_cast(self.view.layer)); + std::make_shared(reinterpret_cast(self.view.layer)); _platformView->Attach(); _platformView->SetupResourceContextOnIOThread();