diff options
author | makdharma <makdharma@users.noreply.github.com> | 2016-06-24 13:58:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-24 13:58:21 -0700 |
commit | d1bdfd0bcfa4966e95afd8468a4990b984d2789d (patch) | |
tree | 31f0979521cce06cfc6c77e28f652b9e88925b7b /src/objective-c/examples/SwiftSample | |
parent | 80dc760acc28b8efe65c039e47375b51dbc0f742 (diff) | |
parent | d6f8f0b7cd9c1e92219027919eb8a562763e029b (diff) |
Merge pull request #7029 from y-zeng/fix-swiftsample
Fix build error of SwiftSample project on Xcode 7.3 (Swift 2.2)
Diffstat (limited to 'src/objective-c/examples/SwiftSample')
-rw-r--r-- | src/objective-c/examples/SwiftSample/ViewController.swift | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/objective-c/examples/SwiftSample/ViewController.swift b/src/objective-c/examples/SwiftSample/ViewController.swift index a21ce07978..2a95d2de51 100644 --- a/src/objective-c/examples/SwiftSample/ViewController.swift +++ b/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 { |