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' => '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' } 9 10 s.ios.deployment_target = '7.1' 11 s.osx.deployment_target = '10.9' 12 13 # Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients. 14 s.dependency "!ProtoCompiler-gRPCPlugin" 15 16 repo_root = '../../../..' 17 bin_dir = "#{repo_root}/bins/$CONFIG" 18 19 protoc = "#{bin_dir}/protobuf/protoc" 20 well_known_types_dir = "#{repo_root}/third_party/protobuf/src" 21 plugin = "#{bin_dir}/grpc_objective_c_plugin" 22 23 s.prepare_command = <<-CMD 24 #{protoc} \ 25 --plugin=protoc-gen-grpc=#{plugin} \ 26 --objc_out=. \ 27 --grpc_out=. \ 28 -I . \ 29 -I #{well_known_types_dir} \ 30 *.proto 31 CMD 32 33 s.subspec 'Messages' do |ms| 34 ms.source_files = '*.pbobjc.{h,m}' 35 ms.header_mappings_dir = '.' 36 ms.requires_arc = false 37 ms.dependency 'Protobuf' 38 end 39 40 s.subspec 'Services' do |ss| 41 ss.source_files = '*.pbrpc.{h,m}' 42 ss.header_mappings_dir = '.' 43 ss.requires_arc = true 44 ss.dependency 'gRPC-ProtoRPC' 45 ss.dependency "#{s.name}/Messages" 46 end 47 48 s.pod_target_xcconfig = { 49 # This is needed by all pods that depend on Protobuf: 50 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', 51 # This is needed by all pods that depend on gRPC-RxLibrary: 52 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES', 53 } 54end 55