Created
July 7, 2020 07:32
-
-
Save chinmaygarde/b759b8a85571a979a33df16dcc852b05 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm | |
index bc8f4c457..ee1df602c 100644 | |
--- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm | |
+++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm | |
@@ -489,6 +489,11 @@ static void sendFakeTouchEvent(FlutterEngine* engine, | |
// NotifyCreated/NotifyDestroyed are synchronous and require hops between the UI and raster | |
// thread. | |
if (appeared) { | |
+ if ([UIApplication sharedApplication].applicationState != UIApplicationStateActive) { | |
+ NSLog(@"Attempted to call surface appeared while still in the background. Ignoring."); | |
+ return; | |
+ } | |
+ | |
[self installFirstFrameCallback]; | |
[_engine.get() platformViewsController]->SetFlutterView(_flutterView.get()); | |
[_engine.get() platformViewsController]->SetFlutterViewController(self); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment