From d2f96d6d64bebcc7e42c4492847732910a28618f Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 17 Oct 2019 11:25:04 -0700 Subject: [PATCH] Use new transport selector --- examples/objective-c/helloworld/main.m | 3 ++- examples/objective-c/helloworld_macos/main.m | 3 ++- examples/objective-c/route_guide/ViewControllers.m | 10 ++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/examples/objective-c/helloworld/main.m b/examples/objective-c/helloworld/main.m index d193af862ba..95b05e0ac99 100644 --- a/examples/objective-c/helloworld/main.m +++ b/examples/objective-c/helloworld/main.m @@ -21,6 +21,7 @@ #import #import +#import #if COCOAPODS #import #else @@ -55,7 +56,7 @@ int main(int argc, char * argv[]) { GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init]; // this example does not use TLS (secure channel); use insecure channel instead - options.transportType = GRPCTransportTypeInsecure; + options.transport = GRPCDefaultTransportImplList.core_insecure; options.userAgentPrefix = @"HelloWorld/1.0"; GRPCUnaryProtoCall *call = [client sayHelloWithMessage:request diff --git a/examples/objective-c/helloworld_macos/main.m b/examples/objective-c/helloworld_macos/main.m index c0e7ef3c9ab..12b2d94154a 100644 --- a/examples/objective-c/helloworld_macos/main.m +++ b/examples/objective-c/helloworld_macos/main.m @@ -20,6 +20,7 @@ #import #import +#import #if COCOAPODS #import #else @@ -54,7 +55,7 @@ int main(int argc, const char * argv[]) { GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init]; // this example does not use TLS (secure channel); use insecure channel instead - options.transportType = GRPCTransportTypeInsecure; + options.transport = GRPCDefaultTransportImplList.core_insecure; options.userAgentPrefix = @"HelloWorld/1.0"; GRPCUnaryProtoCall *call = [client sayHelloWithMessage:request diff --git a/examples/objective-c/route_guide/ViewControllers.m b/examples/objective-c/route_guide/ViewControllers.m index f36bfe607b5..7033cb28f78 100644 --- a/examples/objective-c/route_guide/ViewControllers.m +++ b/examples/objective-c/route_guide/ViewControllers.m @@ -23,6 +23,8 @@ #import "examples/protos/RouteGuide.pbrpc.h" #endif +#import + static NSString * const kHostAddress = @"localhost:50051"; /** Category to override RTGPoint's description. */ @@ -123,7 +125,7 @@ static NSString * const kHostAddress = @"localhost:50051"; [super viewDidLoad]; GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init]; - options.transportType = GRPCTransportTypeInsecure; + options.transport = GRPCDefaultTransportImplList.core_insecure; _service = [[RTGRouteGuide alloc] initWithHost:kHostAddress callOptions:options]; } @@ -193,7 +195,7 @@ static NSString * const kHostAddress = @"localhost:50051"; [super viewDidLoad]; GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init]; - options.transportType = GRPCTransportTypeInsecure; + options.transport = GRPCDefaultTransportImplList.core_insecure; _service = [[RTGRouteGuide alloc] initWithHost:kHostAddress callOptions:options]; } @@ -286,7 +288,7 @@ static NSString * const kHostAddress = @"localhost:50051"; [super viewDidLoad]; GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init]; - options.transportType = GRPCTransportTypeInsecure; + options.transport = GRPCDefaultTransportImplList.core_insecure; _service = [[RTGRouteGuide alloc] initWithHost:kHostAddress callOptions:options]; } @@ -360,7 +362,7 @@ static NSString * const kHostAddress = @"localhost:50051"; [super viewDidLoad]; GRPCMutableCallOptions *options = [[GRPCMutableCallOptions alloc] init]; - options.transportType = GRPCTransportTypeInsecure; + options.transport = GRPCDefaultTransportImplList.core_insecure; _service = [[RTGRouteGuide alloc] initWithHost:kHostAddress callOptions:options]; }