aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/GRPCClient/private/GRPCUnsecuredChannel.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/objective-c/GRPCClient/private/GRPCUnsecuredChannel.m')
-rw-r--r--src/objective-c/GRPCClient/private/GRPCUnsecuredChannel.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/objective-c/GRPCClient/private/GRPCUnsecuredChannel.m b/src/objective-c/GRPCClient/private/GRPCUnsecuredChannel.m
index 8518f78c5b..070a529629 100644
--- a/src/objective-c/GRPCClient/private/GRPCUnsecuredChannel.m
+++ b/src/objective-c/GRPCClient/private/GRPCUnsecuredChannel.m
@@ -41,4 +41,10 @@
return (self = [super initWithChannel:grpc_insecure_channel_create(host.UTF8String, NULL)]);
}
+// TODO(jcanizales): GRPCSecureChannel and GRPCUnsecuredChannel are just convenience initializers
+// for GRPCChannel. Move them into GRPCChannel, which will make the following unnecessary.
+- (instancetype)initWithChannel:(grpc_channel *)unmanagedChannel {
+ [NSException raise:NSInternalInconsistencyException format:@"use the other initializer"];
+ return [self initWithHost:nil]; // silence warnings
+}
@end