aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/examples/SwiftSample/ViewController.swift
diff options
context:
space:
mode:
Diffstat (limited to 'src/objective-c/examples/SwiftSample/ViewController.swift')
-rw-r--r--src/objective-c/examples/SwiftSample/ViewController.swift10
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))")
})
}
}