4 s.license = "Apache License, Version 2.0"
5 s.authors = { 'gRPC contributors' => 'grpc-io@googlegroups.com' }
6 s.homepage = "https://grpc.io/"
7 s.summary = "RemoteTest example"
8 s.source = { :git => 'https://github.com/grpc/grpc.git' }
10 s.ios.deployment_target = '7.1'
11 s.osx.deployment_target = '10.9'
13 # Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.
14 s.dependency "!ProtoCompiler-gRPCPlugin"
16 repo_root = '../../../..'
17 config = ENV['CONFIG'] || 'opt'
18 bin_dir = "#{repo_root}/bins/#{config}"
20 protoc = "#{bin_dir}/protobuf/protoc"
21 well_known_types_dir = "#{repo_root}/third_party/protobuf/src"
22 plugin = "#{bin_dir}/grpc_objective_c_plugin"
24 s.prepare_command = <<-CMD
25 if [ -f #{protoc} ]; then
27 --plugin=protoc-gen-grpc=#{plugin} \
31 -I #{well_known_types_dir} \
34 # protoc was not found bin_dir, use installed version instead
35 (>&2 echo "\nWARNING: Using installed version of protoc. It might be incompatible with gRPC")
38 --plugin=protoc-gen-grpc=#{plugin} \
42 -I #{well_known_types_dir} \
47 s.subspec "Messages" do |ms|
48 ms.source_files = "*.pbobjc.{h,m}"
49 ms.header_mappings_dir = "."
50 ms.requires_arc = false
51 ms.dependency "Protobuf"
54 s.subspec "Services" do |ss|
55 ss.source_files = "*.pbrpc.{h,m}"
56 ss.header_mappings_dir = "."
57 ss.requires_arc = true
58 ss.dependency "gRPC-ProtoRPC"
59 ss.dependency "#{s.name}/Messages"
62 s.pod_target_xcconfig = {
63 # This is needed by all pods that depend on Protobuf:
64 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO=1',
65 # This is needed by all pods that depend on gRPC-RxLibrary:
66 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',