aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c
diff options
context:
space:
mode:
authorGravatar Jorge Canizales <jcanizales@google.com>2015-04-21 05:01:53 -0700
committerGravatar Jorge Canizales <jcanizales@google.com>2015-04-22 11:35:47 -0700
commit17b43e8982d9ab52bf6b01b50d37c8466bd52101 (patch)
treee792cd0ecd4c38f7296efdf32bb71a84d0515c80 /src/objective-c
parentf593fef55059e4df550a6d3ef9cb13eed79caf61 (diff)
Fixes initializer of the generated stub
Diffstat (limited to 'src/objective-c')
-rw-r--r--src/objective-c/examples/Sample/RemoteTestClient/Test.pb.h1
-rw-r--r--src/objective-c/examples/Sample/RemoteTestClient/Test.pb.m6
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)