diff options
author | Muxi Yan <mxyan@google.com> | 2018-12-06 12:42:27 -0800 |
---|---|---|
committer | Muxi Yan <mxyan@google.com> | 2018-12-06 12:51:24 -0800 |
commit | 76f1ec16e1880605215beb60a204b0cab7c36b2d (patch) | |
tree | 108a7fefb41921a7a9fbb9cd94e3334496ebeab2 /src/objective-c/examples/SwiftSample/ViewController.swift | |
parent | 70f34521deaeaf0d783f30d121fd26787135ac04 (diff) |
sensible nullability annotation for old API
Diffstat (limited to 'src/objective-c/examples/SwiftSample/ViewController.swift')
-rw-r--r-- | src/objective-c/examples/SwiftSample/ViewController.swift | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/objective-c/examples/SwiftSample/ViewController.swift b/src/objective-c/examples/SwiftSample/ViewController.swift index 0ba6e21f02..4ed10266a4 100644 --- a/src/objective-c/examples/SwiftSample/ViewController.swift +++ b/src/objective-c/examples/SwiftSample/ViewController.swift @@ -54,8 +54,8 @@ class ViewController: UIViewController { } else { NSLog("2. Finished with error: \(error!)") } - NSLog("2. Response headers: \(RPC.responseHeaders)") - NSLog("2. Response trailers: \(RPC.responseTrailers)") + NSLog("2. Response headers: \(String(describing: RPC.responseHeaders))") + NSLog("2. Response trailers: \(String(describing: RPC.responseTrailers))") } // TODO(jcanizales): Revert to using subscript syntax once XCode 8 is released. @@ -68,7 +68,7 @@ class ViewController: UIViewController { let method = GRPCProtoMethod(package: "grpc.testing", service: "TestService", method: "UnaryCall")! - let requestsWriter = GRXWriter(value: request.data()) + let requestsWriter = GRXWriter(value: request.data())! let call = GRPCCall(host: RemoteHost, path: method.httpPath, requestsWriter: requestsWriter)! @@ -80,8 +80,8 @@ class ViewController: UIViewController { } else { NSLog("3. Finished with error: \(error!)") } - NSLog("3. Response headers: \(call.responseHeaders)") - NSLog("3. Response trailers: \(call.responseTrailers)") + NSLog("3. Response headers: \(String(describing: call.responseHeaders))") + NSLog("3. Response trailers: \(String(describing: call.responseTrailers))") }) } } |