Skip to content

Commit

Permalink
Import <Foundation/Foundation.h> so that NSObject is defined when GPB…
Browse files Browse the repository at this point in the history
…_GRPC_PROTOCOL_ONLY=1
  • Loading branch information
pbatg committed Sep 2, 2020
1 parent d109f4b commit eca5e18
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compiler/objective_c_plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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" +
Expand Down

0 comments on commit eca5e18

Please sign in to comment.