From eca5e18802a195f8e2243dc2c7cd2a753ca445f3 Mon Sep 17 00:00:00 2001 From: pbatg <23102240+pbatg@users.noreply.github.com> Date: Fri, 28 Aug 2020 14:19:47 -0400 Subject: [PATCH] Import so that NSObject is defined when GPB_GRPC_PROTOCOL_ONLY=1 --- src/compiler/objective_c_plugin.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 33be3cf09f1..7f4a0d3be33 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -236,7 +236,8 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } Write(context, file_name + ".pbrpc.h", - file_header + PreprocIfNot(kForwardDeclare, imports) + "\n" + + file_header + SystemImport("Foundation/Foundation.h") + "\n" + + PreprocIfNot(kForwardDeclare, imports) + "\n" + PreprocIfNot(kProtocolOnly, system_imports) + "\n" + class_declarations + "\n" + PreprocIfNot(kForwardDeclare, class_imports) + "\n" +