5#import "flutter/shell/platform/darwin/common/framework/Source/FlutterBinaryMessengerRelay.h"
7#include "flutter/fml/logging.h"
12#pragma mark - FlutterBinaryMessenger
22- (void)sendOnChannel:(NSString*)channel message:(NSData*)message {
24 [
self.parent sendOnChannel:channel message:message binaryReply:nil];
26 FML_LOG(WARNING) <<
"Communicating on a dead channel.";
30- (void)sendOnChannel:(NSString*)channel
31 message:(NSData*)message
34 [
self.parent sendOnChannel:channel message:message binaryReply:callback];
36 FML_LOG(WARNING) <<
"Communicating on a dead channel.";
42 return [
self.parent makeBackgroundTaskQueue];
52 return [
self.parent setMessageHandlerOnChannel:channel binaryMessageHandler:handler];
54 FML_LOG(WARNING) <<
"Communicating on a dead channel.";
64 return [
self.parent setMessageHandlerOnChannel:channel
65 binaryMessageHandler:handler
68 FML_LOG(WARNING) <<
"Communicating on a dead channel.";
75 return [
self.parent cleanUpConnection:connection];
77 FML_LOG(WARNING) <<
"Communicating on a dead channel.";
NS_ASSUME_NONNULL_BEGIN typedef void(^ FlutterBinaryReply)(NSData *_Nullable reply)
void(^ FlutterBinaryMessageHandler)(NSData *_Nullable message, FlutterBinaryReply reply)
int64_t FlutterBinaryMessengerConnection
#define FML_LOG(severity)
NSObject< FlutterBinaryMessenger > * parent
NSObject< FlutterTaskQueue > * makeBackgroundTaskQueue()
TODO(gaaclarke): Remove optional when macos supports Background Platform Channels.