File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
shell/platform/darwin/ios/framework/Source Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,14 @@ - (instancetype)initWithEngine:(FlutterEngine*)engine
144
144
self = [super initWithNibName: nibName bundle: nibBundle];
145
145
if (self) {
146
146
_viewOpaque = YES ;
147
+ if (engine.viewController ) {
148
+ FML_LOG (ERROR) << " The supplied FlutterEngine " << [[engine description ] UTF8String ]
149
+ << " is already used with FlutterViewController instance "
150
+ << [[engine.viewController description ] UTF8String ]
151
+ << " . One instance of the FlutterEngine can only be attached to one "
152
+ " FlutterViewController at a time. Set FlutterEngine.viewController "
153
+ " to nil before attaching it to another FlutterViewController." ;
154
+ }
147
155
_engine.reset ([engine retain ]);
148
156
_engineNeedsLaunch = NO ;
149
157
_flutterView.reset ([[FlutterView alloc ] initWithDelegate: _engine opaque: self .isViewOpaque]);
You can’t perform that action at this time.
0 commit comments