Fix Frameworks build error

pull/19704/head
Muxi Yan 6 years ago
parent 3f16518947
commit 07dc75b5ca
  1. 12
      gRPC.podspec
  2. 2
      src/objective-c/GRPCClient/GRPCCallLegacy.h
  3. 39
      src/objective-c/GRPCClient/GRPCCallOptions.h
  4. 37
      src/objective-c/GRPCClient/GRPCTypes.h
  5. 1
      src/objective-c/tests/InteropTests/InteropTestsMultipleChannels.m
  6. 12
      templates/gRPC.podspec.template

@ -40,7 +40,7 @@ Pod::Spec.new do |s|
s.module_name = name
s.header_dir = name
s.default_subspec = 'Interface', 'GRPCCore'
s.default_subspec = 'Interface', 'GRPCCore', 'Interface-Legacy'
s.pod_target_xcconfig = {
# This is needed by all pods that depend on gRPC-RxLibrary:
@ -51,9 +51,11 @@ Pod::Spec.new do |s|
s.subspec 'Interface-Legacy' do |ss|
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
ss.public_header_files = "src/objective-c/GRPCClient/GRPCCallLegacy.h"
ss.public_header_files = "src/objective-c/GRPCClient/GRPCCallLegacy.h",
"src/objective-c/GRPCClient/GRPCTypes.h"
ss.source_files = "src/objective-c/GRPCClient/GRPCCallLegacy.h"
ss.source_files = "src/objective-c/GRPCClient/GRPCCallLegacy.h",
"src/objective-c/GRPCClient/GRPCTypes.h"
end
s.subspec 'Interface' do |ss|
@ -64,8 +66,7 @@ Pod::Spec.new do |s|
'src/objective-c/GRPCClient/GRPCCallOptions.h',
'src/objective-c/GRPCClient/GRPCInterceptor.h',
'src/objective-c/GRPCClient/GRPCTransport.h',
'src/objective-c/GRPCClient/GRPCDispatchable.h',
'src/objective-c/GRPCClient/internal/*.h'
'src/objective-c/GRPCClient/GRPCDispatchable.h'
ss.source_files = 'src/objective-c/GRPCClient/GRPCCall.h',
'src/objective-c/GRPCClient/GRPCCall.m',
@ -112,6 +113,7 @@ Pod::Spec.new do |s|
# Certificates, to be able to establish TLS connections:
ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] }
ss.dependency "#{s.name}/Interface-Legacy", version
ss.dependency "#{s.name}/Interface", version
ss.dependency 'gRPC-Core', version
ss.dependency 'gRPC-RxLibrary', version

@ -22,7 +22,7 @@
*/
#import <RxLibrary/GRXWriter.h>
#import "GRPCCallOptions.h"
#import "GRPCTypes.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnullability-completeness"

@ -18,48 +18,13 @@
#import <Foundation/Foundation.h>
#import "GRPCTypes.h"
NS_ASSUME_NONNULL_BEGIN
typedef char *GRPCTransportId;
@protocol GRPCInterceptorFactory;
/**
* Safety remark of a gRPC method as defined in RFC 2616 Section 9.1
*/
typedef NS_ENUM(NSUInteger, GRPCCallSafety) {
/** Signal that there is no guarantees on how the call affects the server state. */
GRPCCallSafetyDefault = 0,
/** Signal that the call is idempotent. gRPC is free to use PUT verb. */
GRPCCallSafetyIdempotentRequest = 1,
/**
* Signal that the call is cacheable and will not affect server state. gRPC is free to use GET
* verb.
*/
GRPCCallSafetyCacheableRequest = 2,
};
// Compression algorithm to be used by a gRPC call
typedef NS_ENUM(NSUInteger, GRPCCompressionAlgorithm) {
GRPCCompressNone = 0,
GRPCCompressDeflate,
GRPCCompressGzip,
GRPCStreamCompressGzip,
};
// GRPCCompressAlgorithm is deprecated; use GRPCCompressionAlgorithm
typedef GRPCCompressionAlgorithm GRPCCompressAlgorithm;
/** The transport to be used by a gRPC call */
typedef NS_ENUM(NSUInteger, GRPCTransportType) {
GRPCTransportTypeDefault = 0,
/** gRPC internal HTTP/2 stack with BoringSSL */
GRPCTransportTypeChttp2BoringSSL = 0,
/** Cronet stack */
GRPCTransportTypeCronet,
/** Insecure channel. FOR TEST ONLY! */
GRPCTransportTypeInsecure,
};
/**
* Implement this protocol to provide a token to gRPC when a call is initiated.
*/

@ -0,0 +1,37 @@
/**
* Safety remark of a gRPC method as defined in RFC 2616 Section 9.1
*/
typedef NS_ENUM(NSUInteger, GRPCCallSafety) {
/** Signal that there is no guarantees on how the call affects the server state. */
GRPCCallSafetyDefault = 0,
/** Signal that the call is idempotent. gRPC is free to use PUT verb. */
GRPCCallSafetyIdempotentRequest = 1,
/**
* Signal that the call is cacheable and will not affect server state. gRPC is free to use GET
* verb.
*/
GRPCCallSafetyCacheableRequest = 2,
};
// Compression algorithm to be used by a gRPC call
typedef NS_ENUM(NSUInteger, GRPCCompressionAlgorithm) {
GRPCCompressNone = 0,
GRPCCompressDeflate,
GRPCCompressGzip,
GRPCStreamCompressGzip,
};
// GRPCCompressAlgorithm is deprecated; use GRPCCompressionAlgorithm
typedef GRPCCompressionAlgorithm GRPCCompressAlgorithm;
/** The transport to be used by a gRPC call */
typedef NS_ENUM(NSUInteger, GRPCTransportType) {
GRPCTransportTypeDefault = 0,
/** gRPC internal HTTP/2 stack with BoringSSL */
GRPCTransportTypeChttp2BoringSSL = 0,
/** Cronet stack */
GRPCTransportTypeCronet,
/** Insecure channel. FOR TEST ONLY! */
GRPCTransportTypeInsecure,
};

@ -23,6 +23,7 @@
#import <RemoteTest/Test.pbobjc.h>
#import <RemoteTest/Test.pbrpc.h>
#import <RxLibrary/GRXBufferedPipe.h>
#import <GRPCClient/GRPCCallOptions.h>
#import "../ConfigureCronet.h"
#import "InteropTestsBlockCallbacks.h"

@ -42,7 +42,7 @@
s.module_name = name
s.header_dir = name
s.default_subspec = 'Interface', 'GRPCCore'
s.default_subspec = 'Interface', 'GRPCCore', 'Interface-Legacy'
s.pod_target_xcconfig = {
# This is needed by all pods that depend on gRPC-RxLibrary:
@ -53,9 +53,11 @@
s.subspec 'Interface-Legacy' do |ss|
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
ss.public_header_files = "src/objective-c/GRPCClient/GRPCCallLegacy.h"
ss.public_header_files = "src/objective-c/GRPCClient/GRPCCallLegacy.h",
"src/objective-c/GRPCClient/GRPCTypes.h"
ss.source_files = "src/objective-c/GRPCClient/GRPCCallLegacy.h"
ss.source_files = "src/objective-c/GRPCClient/GRPCCallLegacy.h",
"src/objective-c/GRPCClient/GRPCTypes.h"
end
s.subspec 'Interface' do |ss|
@ -66,8 +68,7 @@
'src/objective-c/GRPCClient/GRPCCallOptions.h',
'src/objective-c/GRPCClient/GRPCInterceptor.h',
'src/objective-c/GRPCClient/GRPCTransport.h',
'src/objective-c/GRPCClient/GRPCDispatchable.h',
'src/objective-c/GRPCClient/internal/*.h'
'src/objective-c/GRPCClient/GRPCDispatchable.h'
ss.source_files = 'src/objective-c/GRPCClient/GRPCCall.h',
'src/objective-c/GRPCClient/GRPCCall.m',
@ -114,6 +115,7 @@
# Certificates, to be able to establish TLS connections:
ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] }
ss.dependency "#{s.name}/Interface-Legacy", version
ss.dependency "#{s.name}/Interface", version
ss.dependency 'gRPC-Core', version
ss.dependency 'gRPC-RxLibrary', version

Loading…
Cancel
Save