diff options
author | Jorge Canizales <jcanizales@google.com> | 2015-04-21 05:01:53 -0700 |
---|---|---|
committer | Jorge Canizales <jcanizales@google.com> | 2015-04-22 11:35:47 -0700 |
commit | 17b43e8982d9ab52bf6b01b50d37c8466bd52101 (patch) | |
tree | e792cd0ecd4c38f7296efdf32bb71a84d0515c80 /src/objective-c | |
parent | f593fef55059e4df550a6d3ef9cb13eed79caf61 (diff) |
Fixes initializer of the generated stub
Diffstat (limited to 'src/objective-c')
-rw-r--r-- | src/objective-c/examples/Sample/RemoteTestClient/Test.pb.h | 1 | ||||
-rw-r--r-- | src/objective-c/examples/Sample/RemoteTestClient/Test.pb.m | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.h b/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.h index 92c58a1652..a96244dc12 100644 --- a/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.h +++ b/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.h @@ -161,6 +161,7 @@ // Basic service implementation, over gRPC, that only does marshalling and parsing. @interface RMTTestService : ProtoService<RMTTestService> +- (instancetype)initWithHost:(NSString *)host NS_DESIGNATED_INITIALIZER; @end // @@protoc_insertion_point(global_scope) diff --git a/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.m b/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.m index 959555d4bf..9e1876ef1a 100644 --- a/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.m +++ b/src/objective-c/examples/Sample/RemoteTestClient/Test.pb.m @@ -33,10 +33,16 @@ static NSString *const kServiceName = @"TestService"; @implementation RMTTestService +// Designated initializer - (instancetype)initWithHost:(NSString *)host { return (self = [super initWithHost:host packageName:kPackageName serviceName:kServiceName]); } +- (instancetype)initWithHost:(NSString *)host + packageName:(NSString *)packageName + serviceName:(NSString *)serviceName { + return [self initWithHost:host]; +} #pragma mark EmptyCall(grpc.testing.Empty) returns (grpc.testing.Empty) |