From f5e0e245ead94c57eb653dc9f19e3e986284c330 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Wed, 12 Jul 2017 16:45:45 -0700 Subject: [PATCH] Fix engine on iOS (flutter/engine#3871) Related to https://github.com/flutter/engine/pull/3870. --- .../darwin/ios/framework/Source/FlutterViewController.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();