• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    name = 'GRPCClient'
38    s.module_name = name
39    s.header_dir = name
40
41    s.default_subspec = 'Interface', 'GRPCCore', 'Interface-Legacy'
42
43    s.pod_target_xcconfig = {
44      # This is needed by all pods that depend on gRPC-RxLibrary:
45      'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES',
46      'CLANG_WARN_STRICT_PROTOTYPES' => 'NO',
47    }
48
49    s.ios.deployment_target = '9.0'
50    s.osx.deployment_target = '10.10'
51    s.tvos.deployment_target = '10.0'
52    s.watchos.deployment_target = '4.0'
53
54    s.subspec 'Interface-Legacy' do |ss|
55      ss.header_mappings_dir = 'src/objective-c/GRPCClient'
56
57      ss.public_header_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
58                               "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
59                               "src/objective-c/GRPCClient/GRPCCall+Cronet.h",
60                               "src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
61                               "src/objective-c/GRPCClient/GRPCCall+Tests.h",
62                               "src/objective-c/GRPCClient/GRPCCallLegacy.h",
63                               "src/objective-c/GRPCClient/GRPCTypes.h"
64
65      ss.source_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
66                        "src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
67                        "src/objective-c/GRPCClient/GRPCCall+Cronet.h",
68                        "src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
69                        "src/objective-c/GRPCClient/GRPCCall+Tests.h",
70                        "src/objective-c/GRPCClient/GRPCCallLegacy.h",
71                        "src/objective-c/GRPCClient/GRPCTypes.h",
72                        "src/objective-c/GRPCClient/GRPCTypes.m"
73      ss.dependency "gRPC-RxLibrary/Interface", version
74
75      ss.ios.deployment_target = '9.0'
76      ss.osx.deployment_target = '10.10'
77      ss.tvos.deployment_target = '10.0'
78      ss.watchos.deployment_target = '4.0'
79    end
80
81    s.subspec 'Interface' do |ss|
82      ss.header_mappings_dir = 'src/objective-c/GRPCClient'
83
84      ss.public_header_files = 'src/objective-c/GRPCClient/GRPCCall.h',
85                               'src/objective-c/GRPCClient/GRPCCall+Interceptor.h',
86                               'src/objective-c/GRPCClient/GRPCCallOptions.h',
87                               'src/objective-c/GRPCClient/GRPCInterceptor.h',
88                               'src/objective-c/GRPCClient/GRPCTransport.h',
89                               'src/objective-c/GRPCClient/GRPCDispatchable.h',
90                               'src/objective-c/GRPCClient/version.h'
91
92      ss.source_files = 'src/objective-c/GRPCClient/GRPCCall.h',
93                        'src/objective-c/GRPCClient/GRPCCall.m',
94                        'src/objective-c/GRPCClient/GRPCCall+Interceptor.h',
95                        'src/objective-c/GRPCClient/GRPCCall+Interceptor.m',
96                        'src/objective-c/GRPCClient/GRPCCallOptions.h',
97                        'src/objective-c/GRPCClient/GRPCCallOptions.m',
98                        'src/objective-c/GRPCClient/GRPCDispatchable.h',
99                        'src/objective-c/GRPCClient/GRPCInterceptor.h',
100                        'src/objective-c/GRPCClient/GRPCInterceptor.m',
101                        'src/objective-c/GRPCClient/GRPCTransport.h',
102                        'src/objective-c/GRPCClient/GRPCTransport.m',
103                        'src/objective-c/GRPCClient/internal/*.h',
104                        'src/objective-c/GRPCClient/private/GRPCTransport+Private.h',
105                        'src/objective-c/GRPCClient/private/GRPCTransport+Private.m',
106                        'src/objective-c/GRPCClient/version.h'
107
108      ss.dependency "#{s.name}/Interface-Legacy", version
109
110      ss.ios.deployment_target = '9.0'
111      ss.osx.deployment_target = '10.10'
112      ss.tvos.deployment_target = '10.0'
113      ss.watchos.deployment_target = '4.0'
114    end
115
116    s.subspec 'GRPCCore' do |ss|
117      ss.header_mappings_dir = 'src/objective-c/GRPCClient'
118
119      ss.public_header_files = 'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h',
120                               'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
121                               'src/objective-c/GRPCClient/GRPCCall+OAuth2.h',
122                               'src/objective-c/GRPCClient/GRPCCall+Tests.h',
123                               'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h'
124      ss.private_header_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.h'
125      ss.source_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.{h,m}',
126                        'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h',
127                        'src/objective-c/GRPCClient/GRPCCall+ChannelArg.m',
128                        'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h',
129                        'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.m',
130                        'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
131                        'src/objective-c/GRPCClient/GRPCCall+Cronet.m',
132                        'src/objective-c/GRPCClient/GRPCCall+OAuth2.h',
133                        'src/objective-c/GRPCClient/GRPCCall+OAuth2.m',
134                        'src/objective-c/GRPCClient/GRPCCall+Tests.h',
135                        'src/objective-c/GRPCClient/GRPCCall+Tests.m',
136                        'src/objective-c/GRPCClient/GRPCCallLegacy.m'
137
138      # Certificates, to be able to establish TLS connections:
139      ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] }
140
141      ss.dependency "#{s.name}/Interface-Legacy", version
142      ss.dependency "#{s.name}/Interface", version
143      ss.dependency 'gRPC-Core', version
144      ss.dependency 'gRPC-RxLibrary', version
145
146      ss.ios.deployment_target = '9.0'
147      ss.osx.deployment_target = '10.10'
148      ss.tvos.deployment_target = '10.0'
149      ss.watchos.deployment_target = '4.0'
150    end
151
152    s.subspec 'GRPCCoreCronet' do |ss|
153      ss.header_mappings_dir = 'src/objective-c/GRPCClient'
154
155      ss.source_files = 'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
156                        'src/objective-c/GRPCClient/GRPCCall+Cronet.m',
157                        'src/objective-c/GRPCClient/private/GRPCCore/GRPCCoreCronet/*.{h,m}'
158      ss.dependency "#{s.name}/GRPCCore", version
159      ss.dependency 'gRPC-Core/Cronet-Implementation', version
160      ss.dependency 'CronetFramework'
161
162      ss.ios.deployment_target = '9.0'
163    end
164
165    # CFStream is now default. Leaving this subspec only for compatibility purpose.
166    s.subspec 'CFStream' do |ss|
167      ss.dependency "#{s.name}/GRPCCore", version
168
169      ss.ios.deployment_target = '9.0'
170      ss.osx.deployment_target = '10.10'
171      ss.tvos.deployment_target = '10.0'
172      ss.watchos.deployment_target = '4.0'
173    end
174
175    s.subspec 'InternalTesting' do |ss|
176      ss.dependency "#{s.name}/GRPCCore", version
177      ss.public_header_files = 'src/objective-c/GRPCClient/internal_testing/*.h'
178      ss.source_files = 'src/objective-c/GRPCClient/internal_testing/*.{h,m}'
179      ss.header_mappings_dir = 'src/objective-c/GRPCClient'
180
181      ss.ios.deployment_target = '9.0'
182      ss.osx.deployment_target = '10.10'
183      ss.tvos.deployment_target = '10.0'
184      ss.watchos.deployment_target = '4.0'
185    end
186  end
187