xref: /aosp_15_r20/external/grpc-grpc/gRPC.podspec (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
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
21Pod::Spec.new do |s|
22  s.name     = 'gRPC'
23  version = '1.63.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' => '[email protected]' }
29
30  s.source = {
31    :git => 'https://github.com/grpc/grpc.git',
32    :tag => "v#{version}",
33  }
34
35  name = 'GRPCClient'
36  s.module_name = name
37  s.header_dir = name
38
39  s.default_subspec = 'Interface', 'GRPCCore', 'Interface-Legacy'
40
41  s.pod_target_xcconfig = {
42    # This is needed by all pods that depend on gRPC-RxLibrary:
43    'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
44    'CLANG_WARN_STRICT_PROTOTYPES' => 'NO',
45    'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14',
46  }
47
48  s.ios.deployment_target = '10.0'
49  s.osx.deployment_target = '10.12'
50  s.tvos.deployment_target = '12.0'
51  s.watchos.deployment_target = '6.0'
52
53  # Exposes the privacy manifest. Depended on by any subspecs containing
54  # non-interface files.
55  s.subspec 'Privacy' do |ss|
56    ss.resource_bundles = {
57      s.module_name => 'src/objective-c/PrivacyInfo.xcprivacy'
58    }
59  end
60
61  s.subspec 'Interface-Legacy' do |ss|
62    ss.header_mappings_dir = 'src/objective-c/GRPCClient'
63
64    ss.public_header_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
65                             "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
66                             "src/objective-c/GRPCClient/GRPCCall+Cronet.h",
67                             "src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
68                             "src/objective-c/GRPCClient/GRPCCall+Tests.h",
69                             "src/objective-c/GRPCClient/GRPCCallLegacy.h",
70                             "src/objective-c/GRPCClient/GRPCTypes.h"
71
72    ss.source_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
73                      "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
74                      "src/objective-c/GRPCClient/GRPCCall+Cronet.h",
75                      "src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
76                      "src/objective-c/GRPCClient/GRPCCall+Tests.h",
77                      "src/objective-c/GRPCClient/GRPCCallLegacy.h",
78                      "src/objective-c/GRPCClient/GRPCTypes.h",
79                      "src/objective-c/GRPCClient/GRPCTypes.mm"
80    ss.dependency "gRPC-RxLibrary/Interface", version
81    ss.dependency "#{s.name}/Privacy", version
82    s.ios.deployment_target = '10.0'
83    s.osx.deployment_target = '10.12'
84    s.tvos.deployment_target = '12.0'
85    s.watchos.deployment_target = '6.0'
86  end
87
88  s.subspec 'Interface' do |ss|
89    ss.header_mappings_dir = 'src/objective-c/GRPCClient'
90
91    ss.public_header_files = 'src/objective-c/GRPCClient/GRPCCall.h',
92                             'src/objective-c/GRPCClient/GRPCCall+Interceptor.h',
93                             'src/objective-c/GRPCClient/GRPCCallOptions.h',
94                             'src/objective-c/GRPCClient/GRPCInterceptor.h',
95                             'src/objective-c/GRPCClient/GRPCTransport.h',
96                             'src/objective-c/GRPCClient/GRPCDispatchable.h',
97                             'src/objective-c/GRPCClient/version.h'
98
99    ss.source_files = 'src/objective-c/GRPCClient/GRPCCall.h',
100                      'src/objective-c/GRPCClient/GRPCCall.mm',
101                      'src/objective-c/GRPCClient/GRPCCall+Interceptor.h',
102                      'src/objective-c/GRPCClient/GRPCCall+Interceptor.mm',
103                      'src/objective-c/GRPCClient/GRPCCallOptions.h',
104                      'src/objective-c/GRPCClient/GRPCCallOptions.mm',
105                      'src/objective-c/GRPCClient/GRPCDispatchable.h',
106                      'src/objective-c/GRPCClient/GRPCInterceptor.h',
107                      'src/objective-c/GRPCClient/GRPCInterceptor.mm',
108                      'src/objective-c/GRPCClient/GRPCTransport.h',
109                      'src/objective-c/GRPCClient/GRPCTransport.mm',
110                      'src/objective-c/GRPCClient/internal/*.h',
111                      'src/objective-c/GRPCClient/private/GRPCTransport+Private.h',
112                      'src/objective-c/GRPCClient/private/GRPCTransport+Private.mm',
113                      'src/objective-c/GRPCClient/version.h'
114
115    ss.dependency "#{s.name}/Interface-Legacy", version
116    ss.dependency "#{s.name}/Privacy", version
117    s.ios.deployment_target = '10.0'
118    s.osx.deployment_target = '10.12'
119    s.tvos.deployment_target = '12.0'
120    s.watchos.deployment_target = '6.0'
121  end
122
123  s.subspec 'GRPCCore' do |ss|
124    ss.header_mappings_dir = 'src/objective-c/GRPCClient'
125
126    ss.public_header_files = 'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h',
127                             'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
128                             'src/objective-c/GRPCClient/GRPCCall+OAuth2.h',
129                             'src/objective-c/GRPCClient/GRPCCall+Tests.h',
130                             'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h'
131    ss.private_header_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.h'
132    ss.source_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.{h,mm}',
133                      'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h',
134                      'src/objective-c/GRPCClient/GRPCCall+ChannelArg.mm',
135                      'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h',
136                      'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.mm',
137                      'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
138                      'src/objective-c/GRPCClient/GRPCCall+Cronet.mm',
139                      'src/objective-c/GRPCClient/GRPCCall+OAuth2.h',
140                      'src/objective-c/GRPCClient/GRPCCall+OAuth2.mm',
141                      'src/objective-c/GRPCClient/GRPCCall+Tests.h',
142                      'src/objective-c/GRPCClient/GRPCCall+Tests.mm',
143                      'src/objective-c/GRPCClient/GRPCCallLegacy.mm'
144
145    # Certificates, to be able to establish TLS connections:
146    ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] }
147
148    ss.dependency "#{s.name}/Interface-Legacy", version
149    ss.dependency "#{s.name}/Interface", version
150    ss.dependency "#{s.name}/Privacy", version
151    ss.dependency 'gRPC-Core', version
152    ss.dependency 'gRPC-RxLibrary', version
153
154    s.ios.deployment_target = '10.0'
155    s.osx.deployment_target = '10.12'
156    s.tvos.deployment_target = '12.0'
157    s.watchos.deployment_target = '6.0'
158  end
159
160  s.subspec 'GRPCCoreCronet' do |ss|
161    ss.header_mappings_dir = 'src/objective-c/GRPCClient'
162
163    ss.source_files = 'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
164                      'src/objective-c/GRPCClient/GRPCCall+Cronet.mm',
165                      'src/objective-c/GRPCClient/private/GRPCCore/GRPCCoreCronet/*.{h,mm}'
166    ss.dependency "#{s.name}/GRPCCore", version
167    ss.dependency "#{s.name}/Privacy", version
168    ss.dependency 'gRPC-Core/Cronet-Implementation', version
169    ss.dependency 'CronetFramework'
170
171    ss.ios.deployment_target = '10.0'
172  end
173
174  # CFStream is now default. Leaving this subspec only for compatibility purpose.
175  s.subspec 'CFStream' do |ss|
176    ss.dependency "#{s.name}/GRPCCore", version
177
178    s.ios.deployment_target = '10.0'
179    s.osx.deployment_target = '10.12'
180    s.tvos.deployment_target = '12.0'
181    s.watchos.deployment_target = '6.0'
182  end
183
184  s.subspec 'InternalTesting' do |ss|
185    ss.dependency "#{s.name}/GRPCCore", version
186    ss.public_header_files = 'src/objective-c/GRPCClient/internal_testing/*.h'
187    ss.source_files = 'src/objective-c/GRPCClient/internal_testing/*.{h,mm}'
188    ss.header_mappings_dir = 'src/objective-c/GRPCClient'
189
190    s.ios.deployment_target = '10.0'
191    s.osx.deployment_target = '10.12'
192    s.tvos.deployment_target = '12.0'
193    s.watchos.deployment_target = '6.0'
194  end
195end
196