From 2fe0dcd06bdb6d76a3ff2a0b0f9b6d5e2e6a0a05 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Sun, 11 Oct 2015 13:53:49 -0700 Subject: Fix example to Beta version --- examples/objective-c/helloworld/main.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'examples/objective-c/helloworld') diff --git a/examples/objective-c/helloworld/main.m b/examples/objective-c/helloworld/main.m index 458580be30..a62f8362a2 100644 --- a/examples/objective-c/helloworld/main.m +++ b/examples/objective-c/helloworld/main.m @@ -34,18 +34,24 @@ #import #import "AppDelegate.h" +#import #import -static NSString * const kHostAddress = @"http://localhost:50051"; +static NSString * const kHostAddress = @"localhost:50051"; int main(int argc, char * argv[]) { @autoreleasepool { + [GRPCCall useInsecureConnectionsForHost:kHostAddress]; + HLWGreeter *client = [[HLWGreeter alloc] initWithHost:kHostAddress]; + HLWHelloRequest *request = [HLWHelloRequest message]; request.name = @"Objective-C"; + [client sayHelloWithRequest:request handler:^(HLWHelloReply *response, NSError *error) { NSLog(@"%@", response.message); }]; + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } } -- cgit v1.2.3