Skip to content

Commit

Permalink
remove extra redundant channels setup in iOS embedding engine (flutte…
Browse files Browse the repository at this point in the history
  • Loading branch information
xster authored Sep 5, 2019
1 parent 4243324 commit dd71e7b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ - (instancetype)initWithName:(NSString*)labelPrefix
_pluginPublications = [NSMutableDictionary new];
_platformViewsController.reset(new flutter::FlutterPlatformViewsController());

[self setupChannels];
_binaryMessenger = [[FlutterBinaryMessengerRelay alloc] initWithParent:self];

NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,23 @@ - (void)testIsolateId {
XCTAssertNil(engine.isolateId);
}

- (void)testChannelSetup {
FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"test" project:nil];
XCTAssertNil(engine.navigationChannel);
XCTAssertNil(engine.platformChannel);
XCTAssertNil(engine.lifecycleChannel);

XCTAssertTrue([engine runWithEntrypoint:nil]);

XCTAssertNotNil(engine.navigationChannel);
XCTAssertNotNil(engine.platformChannel);
XCTAssertNotNil(engine.lifecycleChannel);

[engine destroyContext];

XCTAssertNil(engine.navigationChannel);
XCTAssertNil(engine.platformChannel);
XCTAssertNil(engine.lifecycleChannel);
}

@end

0 comments on commit dd71e7b

Please sign in to comment.