From 5a7b0bdf13d2a70b93f7710b5e93173cc86c493c Mon Sep 17 00:00:00 2001 From: gaaclarke <30870216+gaaclarke@users.noreply.github.com> Date: Wed, 21 Sep 2022 09:30:06 -0700 Subject: [PATCH] macos isolate platform channels (#110882) --- dev/integration_tests/channels/lib/main.dart | 2 +- .../channels/macos/Runner/MainFlutterWindow.swift | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dev/integration_tests/channels/lib/main.dart b/dev/integration_tests/channels/lib/main.dart index 7ca133fbab..7b46fa84b2 100644 --- a/dev/integration_tests/channels/lib/main.dart +++ b/dev/integration_tests/channels/lib/main.dart @@ -173,7 +173,7 @@ class _TestAppState extends State { () => basicStringMessageToUnknownChannel(), () => basicJsonMessageToUnknownChannel(), () => basicStandardMessageToUnknownChannel(), - if (Platform.isIOS || Platform.isAndroid) + if (Platform.isIOS || Platform.isAndroid || Platform.isMacOS) () => basicBackgroundStandardEcho(123), ]; Future? _result; diff --git a/dev/integration_tests/channels/macos/Runner/MainFlutterWindow.swift b/dev/integration_tests/channels/macos/Runner/MainFlutterWindow.swift index 5e54fd8a24..b72f3c3bc4 100644 --- a/dev/integration_tests/channels/macos/Runner/MainFlutterWindow.swift +++ b/dev/integration_tests/channels/macos/Runner/MainFlutterWindow.swift @@ -99,6 +99,13 @@ class MainFlutterWindow: NSWindow { binaryMessenger: registrar.messenger, codec: FlutterStandardMethodCodec(readerWriter: ExtendedReaderWriter()))) + FlutterBasicMessageChannel( + name: "std-echo", binaryMessenger: registrar.messenger, + codec: FlutterStandardMessageCodec.sharedInstance() + ).setMessageHandler { message, reply in + reply(message) + } + super.awakeFromNib() }