1Pod::Spec.new do |s| 2 s.name = "RemoteTest" 3 s.version = "0.0.1" 4 s.license = "Apache License, Version 2.0" 5 s.authors = { 'gRPC contributors' => '[email protected]' } 6 s.homepage = "https://grpc.io/" 7 s.summary = "RemoteTest example" 8 s.source = { :git => 'https://github.com/grpc/grpc.git' } 9 10 s.ios.deployment_target = '10.0' 11 s.osx.deployment_target = '10.12' 12 s.tvos.deployment_target = '12.0' 13 s.watchos.deployment_target = '6.0' 14 15 # Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients. 16 s.dependency "!ProtoCompiler-gRPCPlugin" 17 18 repo_root = '../../../..' 19 bazel_exec_root = "#{repo_root}/bazel-bin" 20 21 protoc = "#{bazel_exec_root}/external/com_google_protobuf/protoc" 22 well_known_types_dir = "#{repo_root}/third_party/protobuf/src" 23 plugin = "#{bazel_exec_root}/src/compiler/grpc_objective_c_plugin" 24 25 s.prepare_command = <<-CMD 26 #{protoc} \ 27 --plugin=protoc-gen-grpc=#{plugin} \ 28 --objc_out=. \ 29 --grpc_out=. \ 30 -I #{repo_root} \ 31 -I #{well_known_types_dir} \ 32 #{repo_root}/src/objective-c/tests/RemoteTestClient/*.proto 33 CMD 34 35 s.subspec "Messages" do |ms| 36 ms.source_files = "src/objective-c/tests/RemoteTestClient/*.pbobjc.{h,m}" 37 ms.header_mappings_dir = "." 38 ms.requires_arc = false 39 ms.dependency "Protobuf" 40 end 41 42 s.subspec "Services" do |ss| 43 ss.source_files = "src/objective-c/tests/RemoteTestClient/*.pbrpc.{h,m}" 44 ss.header_mappings_dir = "." 45 ss.requires_arc = true 46 ss.dependency "gRPC-ProtoRPC" 47 ss.dependency "#{s.name}/Messages" 48 end 49 50 s.pod_target_xcconfig = { 51 # This is needed by all pods that depend on Protobuf: 52 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO=1', 53 # This is needed by all pods that depend on gRPC-RxLibrary: 54 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES', 55 } 56end 57