aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/objective-c
diff options
context:
space:
mode:
authorGravatar Kristopher Wuollett <klw@google.com>2016-01-31 14:26:39 -0500
committerGravatar Kristopher Wuollett <klw@google.com>2016-01-31 14:26:39 -0500
commitc6b301775c4a783dec72f3939e489bce8eadf8a5 (patch)
treebb432f52a53cc9dae14e0af24209f2fbeaeb7a00 /examples/objective-c
parent01ba279fdddb28096893a4e09a62b915cdbca6be (diff)
Add channel args to enable user agent string for Objective-C
Diffstat (limited to 'examples/objective-c')
-rw-r--r--examples/objective-c/helloworld/main.m2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/objective-c/helloworld/main.m b/examples/objective-c/helloworld/main.m
index a62f8362a2..f390b5a0f9 100644
--- a/examples/objective-c/helloworld/main.m
+++ b/examples/objective-c/helloworld/main.m
@@ -34,6 +34,7 @@
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
+#import <GRPCClient/GRPCCall+ChannelArg.h>
#import <GRPCClient/GRPCCall+Tests.h>
#import <HelloWorld/Helloworld.pbrpc.h>
@@ -42,6 +43,7 @@ static NSString * const kHostAddress = @"localhost:50051";
int main(int argc, char * argv[]) {
@autoreleasepool {
[GRPCCall useInsecureConnectionsForHost:kHostAddress];
+ [GRPCCall usePrimaryUserAgent:@"HelloWorld/1.0" forHost:kHostAddress];
HLWGreeter *client = [[HLWGreeter alloc] initWithHost:kHostAddress];