aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jorge Canizales <jcanizales@google.com>2015-10-11 13:53:49 -0700
committerGravatar Jorge Canizales <jcanizales@google.com>2015-10-12 18:20:23 -0700
commit2fe0dcd06bdb6d76a3ff2a0b0f9b6d5e2e6a0a05 (patch)
tree29ad47ef9a733b5602d33b18965ef842e4da49bf
parentdfe91b547162f1cbedf13a780d9aaff439ac7137 (diff)
Fix example to Beta version
-rw-r--r--examples/objective-c/helloworld/main.m8
1 files changed, 7 insertions, 1 deletions
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 <UIKit/UIKit.h>
#import "AppDelegate.h"
+#import <GRPCClient/GRPCCall+Tests.h>
#import <HelloWorld/Helloworld.pbrpc.h>
-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]));
}
}