Skip to content

Provide a way to check if a message channel is registered, or fail if it is not. #38914

@dnfield

Description

@dnfield

Ideally, there would be a way to wait for the engine to finish setting up. E.g., the following code is racy (and consistently is a no-op for me on a simulator):

 FlutterEngine* engine = [[FlutterEngine alloc] initWithName:@"PlatformViewTest" project:nil];
    [engine runWithEntrypoint:nil];
  
    [engine.binaryMessenger sendOnChannel:@"set_scenario" message:[@"text_platform_view" dataUsingEncoding:NSUTF8StringEncoding]];

Adding a sleep makes things "work".

Ideally, this message would get delivered once the engine was ready.

/cc @jmagman @xster @chinmaygarde @gaaclarke

Metadata

Metadata

Assignees

Labels

a: existing-appsIntegration with existing apps via the add-to-app flowc: new featureNothing broken; request for a new capabilityengineflutter/engine related. See also e: labels.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions