diff --git a/src/objective-c/ProtoRPC/ProtoRPC.m b/src/objective-c/ProtoRPC/ProtoRPC.m index 48a38bd35ac..03e6839c5a0 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.m +++ b/src/objective-c/ProtoRPC/ProtoRPC.m @@ -175,7 +175,7 @@ static NSError *ErrorForBadProto(id proto, Class expectedClass, NSError *parsing } - (void)writeMessage:(GPBMessage *)message { - NSAssert([message isKindOfClass:[GPBMessage class]]); + NSAssert([message isKindOfClass:[GPBMessage class]], @"Parameter message must be a GPBMessage"); if (![message isKindOfClass:[GPBMessage class]]) { NSLog(@"Failed to send a message that is non-proto."); return; @@ -199,7 +199,7 @@ static NSError *ErrorForBadProto(id proto, Class expectedClass, NSError *parsing - (void)didReceiveInitialMetadata:(NSDictionary *)initialMetadata { @synchronized(self) { - if (initialMetadata != nil && [_handler respondsToSelector:@selector(initialMetadata:)]) { + if (initialMetadata != nil && [_handler respondsToSelector:@selector(didReceiveInitialMetadata:)]) { dispatch_async(_dispatchQueue, ^{ id copiedHandler = nil; @synchronized(self) {