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