diff options
author | 2016-02-05 18:00:45 -0800 | |
---|---|---|
committer | 2016-02-05 18:00:45 -0800 | |
commit | 83f76a8b017f2073d1468be2a01ef8309729e87b (patch) | |
tree | fecd6f884352bb7498443d576aedf97245283436 /examples | |
parent | beb55c3b46debedcacdaab48bdae5b9c80ddf13f (diff) | |
parent | 58d98910add14197aec78aad6be15f5911e21fe4 (diff) |
Merge pull request #4985 from kriswuollett/kriswuollett-objc-useragent
Add channel args to enable user agent string for Objective-C
Diffstat (limited to 'examples')
-rw-r--r-- | examples/objective-c/helloworld/main.m | 2 |
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..755dce33df 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 setUserAgentPrefix:@"HelloWorld/1.0" forHost:kHostAddress]; HLWGreeter *client = [[HLWGreeter alloc] initWithHost:kHostAddress]; |