diff --git a/ProtoRPC.podspec b/ProtoRPC.podspec deleted file mode 100644 index b6191244404e158c930360838d2a4317605b5527..0000000000000000000000000000000000000000 --- a/ProtoRPC.podspec +++ /dev/null @@ -1,17 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'ProtoRPC' - s.version = '0.0.1' - s.summary = 'RPC library for ProtocolBuffers, based on gRPC' - s.homepage = 'https://github.com/grpc/grpc/tree/master/src/objective-c/ProtoRPC' - s.license = 'New BSD' - s.authors = { 'Jorge Canizales' => 'jcanizales@google.com' } - - # s.source = { :git => 'https://github.com/grpc/grpc.git', :tag => 'release-0_5_0' } - s.source_files = 'src/objective-c/ProtoRPC/*.{h,m}' - - s.platform = :ios - s.ios.deployment_target = '6.0' - s.requires_arc = true - - s.dependency 'gRPC', '~> 0.0' -end diff --git a/gRPC.podspec b/gRPC.podspec index 562b797eaffac71fcef50a4cb905f6beec130caf..7f7ff88ea638beb2597c6e3f434385943e1df01a 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -7,15 +7,13 @@ Pod::Spec.new do |s| s.authors = { 'Jorge Canizales' => 'jcanizales@google.com' } # s.source = { :git => 'https://github.com/grpc/grpc.git', :tag => 'release-0_5_0' } - s.source_files = 'src/objective-c/GRPCClient/*.{h,m}', 'src/objective-c/GRPCClient/private/*.{h,m}' - s.private_header_files = 'src/objective-c/GRPCClient/private/*.h' s.platform = :ios s.ios.deployment_target = '6.0' s.requires_arc = true s.subspec 'RxLibrary' do |rs| - rs.summary = 'Reactive Extensions library for iOS' + rs.summary = 'Reactive Extensions library for iOS.' rs.authors = { 'Jorge Canizales' => 'jcanizales@google.com' } rs.source_files = 'src/objective-c/RxLibrary/*.{h,m}', 'src/objective-c/RxLibrary/transformations/*.{h,m}', 'src/objective-c/RxLibrary/private/*.{h,m}' @@ -23,7 +21,7 @@ Pod::Spec.new do |s| end s.subspec 'C-Core' do |cs| - cs.summary = 'Core gRPC library, written in C' + cs.summary = 'Core cross-platform gRPC library, written in C.' cs.authors = { 'Craig Tiller' => 'ctiller@google.com', 'David Klempner' => 'klempner@google.com', 'Nicolas Noble' => 'nnoble@google.com', @@ -38,32 +36,53 @@ Pod::Spec.new do |s| cs.requires_arc = false cs.libraries = 'z' cs.dependency 'OpenSSL', '~> 1.0.200' + + # This is a workaround for Cocoapods Issue #1437. + # It renames time.h and string.h to grpc_time.h and grpc_string.h. + cs.prepare_command = <<-CMD + DIR_TIME="grpc/support" + BAD_TIME="$DIR_TIME/time.h" + GOOD_TIME="$DIR_TIME/grpc_time.h" + if [ -f "include/$BAD_TIME" ]; + then + grep -rl "$BAD_TIME" include/grpc src/core | xargs sed -i '' -e s@$BAD_TIME@$GOOD_TIME@g + mv "include/$BAD_TIME" "include/$GOOD_TIME" + fi + + DIR_STRING="src/core/support" + BAD_STRING="$DIR_STRING/string.h" + GOOD_STRING="$DIR_STRING/grpc_string.h" + if [ -f "$BAD_STRING" ]; + then + grep -rl "$BAD_STRING" include/grpc src/core | xargs sed -i '' -e s@$BAD_STRING@$GOOD_STRING@g + mv "$BAD_STRING" "$GOOD_STRING" + fi + CMD + end + + s.subspec 'GRPCClient' do |gs| + gs.summary = 'Objective-C wrapper around the core gRPC library.' + gs.authors = { 'Jorge Canizales' => 'jcanizales@google.com' } + + gs.source_files = 'src/objective-c/GRPCClient/*.{h,m}', 'src/objective-c/GRPCClient/private/*.{h,m}' + gs.private_header_files = 'src/objective-c/GRPCClient/private/*.h' + + gs.dependency 'gRPC/C-Core' + # Is this needed in all dependents? + gs.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Public/gRPC/include"' } + gs.dependency 'gRPC/RxLibrary' + + # Certificates, to be able to establish TLS connections: + gs.resource_bundles = { 'gRPC' => ['etc/roots.pem'] } end - # This is a workaround for Cocoapods Issue #1437. - # It renames time.h and string.h to grpc_time.h and grpc_string.h. - s.prepare_command = <<-CMD - DIR_TIME="grpc/support" - BAD_TIME="$DIR_TIME/time.h" - GOOD_TIME="$DIR_TIME/grpc_time.h" - if [ -f "include/$BAD_TIME" ]; - then - grep -rl "$BAD_TIME" include/grpc src/core | xargs sed -i '' -e s@$BAD_TIME@$GOOD_TIME@g - mv "include/$BAD_TIME" "include/$GOOD_TIME" - fi - - DIR_STRING="src/core/support" - BAD_STRING="$DIR_STRING/string.h" - GOOD_STRING="$DIR_STRING/grpc_string.h" - if [ -f "$BAD_STRING" ]; - then - grep -rl "$BAD_STRING" include/grpc src/core | xargs sed -i '' -e s@$BAD_STRING@$GOOD_STRING@g - mv "$BAD_STRING" "$GOOD_STRING" - fi - CMD - - s.xcconfig = { 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Public/gRPC/include"' } - - # Certificates, to be able to establish TLS connections: - s.resource_bundles = { 'gRPC' => ['etc/roots.pem'] } + s.subspec 'ProtoRPC' do |ps| + ps.summary = 'RPC library for ProtocolBuffers, based on gRPC' + ps.authors = { 'Jorge Canizales' => 'jcanizales@google.com' } + + ps.source_files = 'src/objective-c/ProtoRPC/*.{h,m}' + + ps.dependency 'gRPC/GRPCClient' + ps.dependency 'gRPC/RxLibrary' + end end diff --git a/src/objective-c/examples/Sample/Podfile b/src/objective-c/examples/Sample/Podfile index 7752d240d095bc2961c0c5435bbf2e6d3094e4a0..8b1a90e39bd0372849557d7d2ccac9797da6e4d9 100644 --- a/src/objective-c/examples/Sample/Podfile +++ b/src/objective-c/examples/Sample/Podfile @@ -2,7 +2,6 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' pod 'gRPC', :path => "../../../.." -pod 'ProtoRPC', :path => "../../../.." pod 'Route_guide', :path => "RouteGuideClient" pod 'RemoteTest', :path => "RemoteTestClient" diff --git a/src/objective-c/examples/Sample/RemoteTestClient/RemoteTest.podspec b/src/objective-c/examples/Sample/RemoteTestClient/RemoteTest.podspec index 8770804617a7a18ef940c4963e97a7e0bc50e42c..7b025ce25283802050dcb53e3ece949bf0a6856c 100644 --- a/src/objective-c/examples/Sample/RemoteTestClient/RemoteTest.podspec +++ b/src/objective-c/examples/Sample/RemoteTestClient/RemoteTest.podspec @@ -14,5 +14,5 @@ Pod::Spec.new do |s| s.requires_arc = true s.dependency 'ProtocolBuffers', '~> 1.9' - s.dependency 'ProtoRPC', '~> 0.0' + s.dependency 'gRPC', '~> 0.0' end diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.h b/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.h index a96244dc12c89e89f83704240a941b2306573895..b6111b15b8ae932a306835cd42c402d1bbb48727 100644 --- a/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.h +++ b/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.h @@ -4,7 +4,7 @@ #import "Empty.pb.h" #import "Messages.pb.h" -#import <ProtoRPC/ProtoService.h> +#import <gRPC/ProtoService.h> // @@protoc_insertion_point(imports) @class ObjectiveCFileOptions; diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.m b/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.m index a34af370203d71d991bd11655eeb2683d66c7f2f..31a3ba3a61143621189bdbf3f82dbd4017a764cc 100644 --- a/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.m +++ b/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.m @@ -2,9 +2,9 @@ #import "Test.pb.h" -#import <ProtoRPC/ProtoRPC.h> #import <gRPC/GRXWriteable.h> #import <gRPC/GRXWriter+Immediate.h> +#import <gRPC/ProtoRPC.h> // @@protoc_insertion_point(imports) @implementation RMTTestRoot