Import <Foundation/Foundation.h> so that NSObject is defined when GPB_GRPC_PROTOCOL_ONLY=1

pull/24049/head
pbatg 5 years ago
parent d109f4b406
commit eca5e18802
  1. 3
      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" +

Loading…
Cancel
Save