diff --git a/gRPC.podspec b/gRPC.podspec index e104f2f513c..38dc708ec0d 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -117,11 +117,9 @@ Pod::Spec.new do |s| 'src/objective-c/GRPCClient/GRPCCall+Cronet.h', 'src/objective-c/GRPCClient/GRPCCall+OAuth2.h', 'src/objective-c/GRPCClient/GRPCCall+Tests.h', - 'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h', - 'src/objective-c/GRPCClient/internal_testing/*.h' + 'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h' ss.private_header_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.h' - ss.source_files = 'src/objective-c/GRPCClient/internal_testing/*.{h,m}', - 'src/objective-c/GRPCClient/private/GRPCCore/*.{h,m}', + ss.source_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.{h,m}', 'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h', 'src/objective-c/GRPCClient/GRPCCall+ChannelArg.m', 'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h', @@ -170,4 +168,16 @@ Pod::Spec.new do |s| ss.tvos.deployment_target = '10.0' ss.watchos.deployment_target = '4.0' end + + s.subspec 'InternalTesting' do |ss| + ss.dependency "#{s.name}/GRPCCore", version + ss.public_header_files = 'src/objective-c/GRPCClient/internal_testing/*.h' + ss.source_files = 'src/objective-c/GRPCClient/internal_testing/*.{h,m}' + ss.header_mappings_dir = 'src/objective-c/GRPCClient' + + ss.ios.deployment_target = '7.0' + ss.osx.deployment_target = '10.9' + ss.tvos.deployment_target = '10.0' + ss.watchos.deployment_target = '4.0' + end end diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index f75b36dc996..664ff94526f 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -13,10 +13,10 @@ def grpc_deps pod 'BoringSSL-GRPC', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true - pod 'gRPC', :path => GRPC_LOCAL_SRC - pod 'gRPC-Core', :path => GRPC_LOCAL_SRC - pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC - pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC, :inhibit_warnings => true + pod 'gRPC/InternalTesting', :path => GRPC_LOCAL_SRC + pod 'gRPC-Core', :path => GRPC_LOCAL_SRC + pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC + pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC, :inhibit_warnings => true pod 'RemoteTest', :path => "RemoteTestClient", :inhibit_warnings => true end diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index e8afdb14062..6420045b104 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -119,11 +119,9 @@ 'src/objective-c/GRPCClient/GRPCCall+Cronet.h', 'src/objective-c/GRPCClient/GRPCCall+OAuth2.h', 'src/objective-c/GRPCClient/GRPCCall+Tests.h', - 'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h', - 'src/objective-c/GRPCClient/internal_testing/*.h' + 'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h' ss.private_header_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.h' - ss.source_files = 'src/objective-c/GRPCClient/internal_testing/*.{h,m}', - 'src/objective-c/GRPCClient/private/GRPCCore/*.{h,m}', + ss.source_files = 'src/objective-c/GRPCClient/private/GRPCCore/*.{h,m}', 'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h', 'src/objective-c/GRPCClient/GRPCCall+ChannelArg.m', 'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h', @@ -172,4 +170,16 @@ ss.tvos.deployment_target = '10.0' ss.watchos.deployment_target = '4.0' end + + s.subspec 'InternalTesting' do |ss| + ss.dependency "#{s.name}/GRPCCore", version + ss.public_header_files = 'src/objective-c/GRPCClient/internal_testing/*.h' + ss.source_files = 'src/objective-c/GRPCClient/internal_testing/*.{h,m}' + ss.header_mappings_dir = 'src/objective-c/GRPCClient' + + ss.ios.deployment_target = '7.0' + ss.osx.deployment_target = '10.9' + ss.tvos.deployment_target = '10.0' + ss.watchos.deployment_target = '4.0' + end end