Update ObjC sample to use the new ProtoMethod instead of GRPCMethodName

pull/4108/head
Benny Wong 9 years ago
parent 0dd67a109a
commit 3f1f5a48f7
  1. 12
      src/objective-c/examples/Sample/Sample/ViewController.m

@ -34,7 +34,7 @@
#import "ViewController.h" #import "ViewController.h"
#import <GRPCClient/GRPCCall.h> #import <GRPCClient/GRPCCall.h>
#import <GRPCClient/GRPCMethodName.h> #import <ProtoRPC/ProtoMethod.h>
#import <RemoteTest/Messages.pbobjc.h> #import <RemoteTest/Messages.pbobjc.h>
#import <RemoteTest/Test.pbrpc.h> #import <RemoteTest/Test.pbrpc.h>
#import <RxLibrary/GRXWriter+Immediate.h> #import <RxLibrary/GRXWriter+Immediate.h>
@ -66,14 +66,14 @@
// Same example call using the generic gRPC client library: // Same example call using the generic gRPC client library:
GRPCMethodName *method = [[GRPCMethodName alloc] initWithPackage:@"grpc.testing" ProtoMethod *method = [[ProtoMethod alloc] initWithPackage:@"grpc.testing"
interface:@"TestService" service:@"TestService"
method:@"UnaryCall"]; method:@"UnaryCall"];
id<GRXWriter> requestsWriter = [GRXWriter writerWithValue:[request data]]; GRXWriter *requestsWriter = [GRXWriter writerWithValue:[request data]];
GRPCCall *call = [[GRPCCall alloc] initWithHost:kRemoteHost GRPCCall *call = [[GRPCCall alloc] initWithHost:kRemoteHost
method:method path:method.HTTPPath
requestsWriter:requestsWriter]; requestsWriter:requestsWriter];
id<GRXWriteable> responsesWriteable = [[GRXWriteable alloc] initWithValueHandler:^(NSData *value) { id<GRXWriteable> responsesWriteable = [[GRXWriteable alloc] initWithValueHandler:^(NSData *value) {

Loading…
Cancel
Save