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 = "HelloWorld 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 # Base directory where the .proto files are.
16 # Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients.
17 s.dependency "!ProtoCompiler-gRPCPlugin", "~> 1.0"
19 # Pods directory corresponding to this app's Podfile, relative to the location of this podspec.
22 # Path where Cocoapods downloads protoc and the gRPC plugin.
23 protoc_dir = "#{pods_root}/!ProtoCompiler"
24 protoc = "#{protoc_dir}/protoc"
25 plugin = "#{pods_root}/!ProtoCompiler-gRPCPlugin/grpc_objective_c_plugin"
27 # Directory where the generated files will be placed.
28 dir = "#{pods_root}/#{s.name}"
30 s.prepare_command = <<-CMD
33 --plugin=protoc-gen-grpc=#{plugin} \
38 #{src}/helloworld.proto
41 # Files generated by protoc
42 s.subspec "Messages" do |ms|
43 ms.source_files = "#{dir}/*.pbobjc.{h,m}", "#{dir}/**/*.pbobjc.{h,m}"
44 ms.header_mappings_dir = dir
45 ms.requires_arc = false
46 # The generated files depend on the protobuf runtime.
47 ms.dependency "Protobuf"
50 # Files generated by the gRPC plugin
51 s.subspec "Services" do |ss|
52 ss.source_files = "#{dir}/*.pbrpc.{h,m}", "#{dir}/**/*.pbrpc.{h,m}"
53 ss.header_mappings_dir = dir
54 ss.requires_arc = true
55 # The generated files depend on the gRPC runtime, and on the files generated by protoc.
56 ss.dependency "gRPC-ProtoRPC"
57 ss.dependency "#{s.name}/Messages"
60 s.pod_target_xcconfig = {
61 # This is needed by all pods that depend on Protobuf:
62 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1',
63 # This is needed by all pods that depend on gRPC-RxLibrary:
64 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',