diff --git a/examples/objective-c/route_guide/ViewControllers.m b/examples/objective-c/route_guide/ViewControllers.m index 61367fdf85fad37dedba1bdb742d7ec6a8d54d1a..0b1a1cf48239c19ae4a5b81921bc65c5ae6b11c8 100644 --- a/examples/objective-c/route_guide/ViewControllers.m +++ b/examples/objective-c/route_guide/ViewControllers.m @@ -32,6 +32,7 @@ */ #import <UIKit/UIKit.h> +#import <GRPCClient/GRPCCall+Tests.h> #import <RouteGuide/RouteGuide.pbrpc.h> #import <RxLibrary/GRXWriter+Immediate.h> #import <RxLibrary/GRXWriter+Transformations.h> @@ -90,7 +91,7 @@ static NSString * const kHostAddress = @"localhost:50051"; // This only needs to be done once per host, before creating service objects for that host. [GRPCCall useInsecureConnectionsForHost:kHostAddress]; - RTGRouteGuide *service = [RTGRouteGuide serviceWithHost:kHostAddress]; + RTGRouteGuide *service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; void (^handler)(RTGFeature *response, NSError *error) = ^(RTGFeature *response, NSError *error) { if (response.name.length) { @@ -127,7 +128,7 @@ static NSString * const kHostAddress = @"localhost:50051"; - (void)viewDidLoad { [super viewDidLoad]; - RTGRouteGuide *service = [RTGRouteGuide serviceWithHost:kHostAddress]; + RTGRouteGuide *service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; RTGRectangle *rectangle = [RTGRectangle message]; rectangle.lo.latitude = 405E6; @@ -177,7 +178,7 @@ static NSString * const kHostAddress = @"localhost:50051"; return location; }]; - RTGRouteGuide *service = [RTGRouteGuide serviceWithHost:kHostAddress]; + RTGRouteGuide *service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; [service recordRouteWithRequestsWriter:locations handler:^(RTGRouteSummary *response, NSError *error) { @@ -218,7 +219,7 @@ static NSString * const kHostAddress = @"localhost:50051"; return note; }]; - RTGRouteGuide *service = [RTGRouteGuide serviceWithHost:kHostAddress]; + RTGRouteGuide *service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; [service routeChatWithRequestsWriter:notesWriter eventHandler:^(BOOL done, RTGRouteNote *note, NSError *error) {