Merge pull request #7029 from y-zeng/fix-swiftsample

Fix build error of SwiftSample project on Xcode 7.3 (Swift 2.2)
pull/7035/merge
makdharma 9 years ago committed by GitHub
commit d1bdfd0bcf
  1. 5
      src/objective-c/examples/SwiftSample/ViewController.swift

@ -71,7 +71,8 @@ class ViewController: UIViewController {
NSLog("2. Response trailers: \(RPC.responseTrailers)")
}
RPC.requestHeaders["My-Header"] = "My value"
// TODO(jcanizales): Revert to using subscript syntax once XCode 8 is released.
RPC.requestHeaders.setObject("My value", forKey: "My-Header")
RPC.start()
@ -84,7 +85,7 @@ class ViewController: UIViewController {
let call = GRPCCall(host: RemoteHost, path: method.HTTPPath, requestsWriter: requestsWriter)
call.requestHeaders["My-Header"] = "My value"
call.requestHeaders.setObject("My value", forKey: "My-Header")
call.startWithWriteable(GRXWriteable { response, error in
if let response = response as? NSData {

Loading…
Cancel
Save