Imported Upstream version 1.21.1
[platform/upstream/grpc.git] / gRPC.podspec
1 # This file has been automatically generated from a template file.
2 # Please make modifications to `templates/gRPC.podspec.template`
3 # instead. This file can be regenerated from the template by running
4 # `tools/buildgen/generate_projects.sh`.
5
6 # Copyright 2015 gRPC authors.
7 #
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 #
12 #     http://www.apache.org/licenses/LICENSE-2.0
13 #
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
19
20
21 Pod::Spec.new do |s|
22   s.name     = 'gRPC'
23   version = '1.21.1'
24   s.version  = version
25   s.summary  = 'gRPC client library for iOS/OSX'
26   s.homepage = 'https://grpc.io'
27   s.license  = 'Apache License, Version 2.0'
28   s.authors  = { 'The gRPC contributors' => 'grpc-packages@google.com' }
29
30   s.source = {
31     :git => 'https://github.com/grpc/grpc.git',
32     :tag => "v#{version}",
33   }
34
35   s.ios.deployment_target = '7.0'
36   s.osx.deployment_target = '10.9'
37   s.tvos.deployment_target = '10.0'
38
39   name = 'GRPCClient'
40   s.module_name = name
41   s.header_dir = name
42
43   src_dir = 'src/objective-c/GRPCClient'
44
45   s.dependency 'gRPC-RxLibrary', version
46   s.default_subspec = 'Main'
47
48   # Certificates, to be able to establish TLS connections:
49   s.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] }
50
51   s.pod_target_xcconfig = {
52     # This is needed by all pods that depend on gRPC-RxLibrary:
53     'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
54     'CLANG_WARN_STRICT_PROTOTYPES' => 'NO',
55   }
56
57   s.subspec 'Main' do |ss|
58     ss.header_mappings_dir = "#{src_dir}"
59
60     ss.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}"
61     ss.exclude_files = "#{src_dir}/GRPCCall+GID.{h,m}"
62     ss.private_header_files = "#{src_dir}/private/*.h", "#{src_dir}/internal/*.h"
63
64     ss.dependency 'gRPC-Core', version
65   end
66
67   # CFStream is now default. Leaving this subspec only for compatibility purpose.
68   s.subspec 'CFStream' do |ss|
69     ss.dependency "#{s.name}/Main", version
70   end
71
72   s.subspec 'GID' do |ss|
73     ss.ios.deployment_target = '7.0'
74
75     ss.header_mappings_dir = "#{src_dir}"
76
77     ss.source_files = "#{src_dir}/GRPCCall+GID.{h,m}"
78
79     ss.dependency "#{s.name}/Main", version
80     ss.dependency 'Google/SignIn'
81   end
82 end