提交 bf86ff50 编写于 作者: C Christian Noon

Fixed compiler issue on OS X when creating the background configuration.

上级 10f94788
......@@ -124,7 +124,16 @@ class ManagerConfigurationHeadersTestCase: BaseTestCase {
configuration = NSURLSessionConfiguration.ephemeralSessionConfiguration()
case .Background:
let identifier = "com.alamofire.test.manager-configuration-tests"
configuration = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier(identifier)
#if os(iOS) || os(watchOS)
configuration = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier(identifier)
#else
if #available(OSX 10.10, *) {
configuration = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier(identifier)
} else {
configuration = NSURLSessionConfiguration.backgroundSessionConfiguration(identifier)
}
#endif
}
var headers = Alamofire.Manager.defaultHTTPHeaders
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册