提交 140bce9e 编写于 作者: C Christian Noon

Removed SecCertificate array workaround in ServerTrustPolicy for Xcode 7.2.

上级 39ca953d
...@@ -25,7 +25,7 @@ Alamofire is an HTTP networking library written in Swift. ...@@ -25,7 +25,7 @@ Alamofire is an HTTP networking library written in Swift.
## Requirements ## Requirements
- iOS 8.0+ / Mac OS X 10.9+ / tvOS 9.0+ / watchOS 2.0+ - iOS 8.0+ / Mac OS X 10.9+ / tvOS 9.0+ / watchOS 2.0+
- Xcode 7.1+ - Xcode 7.2+
## Migration Guides ## Migration Guides
...@@ -1126,7 +1126,6 @@ In order to keep Alamofire focused specifically on core networking implementatio ...@@ -1126,7 +1126,6 @@ In order to keep Alamofire focused specifically on core networking implementatio
The following rdars have some affect on the current implementation of Alamofire. The following rdars have some affect on the current implementation of Alamofire.
* [rdar://22024442](http://www.openradar.me/radar?id=6082025006039040) - Array of [SecCertificate] crashing Swift 2.0 compiler in optimized builds
* [rdar://21349340](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case * [rdar://21349340](http://www.openradar.me/radar?id=5517037090635776) - Compiler throwing warning due to toll-free bridging issue in test case
## FAQ ## FAQ
......
...@@ -193,14 +193,7 @@ public enum ServerTrustPolicy { ...@@ -193,14 +193,7 @@ public enum ServerTrustPolicy {
serverTrustIsValid = trustIsValid(serverTrust) serverTrustIsValid = trustIsValid(serverTrust)
} else { } else {
let serverCertificatesDataArray = certificateDataForTrust(serverTrust) let serverCertificatesDataArray = certificateDataForTrust(serverTrust)
let pinnedCertificatesDataArray = certificateDataForCertificates(pinnedCertificates)
//======================================================================================================
// The following `[] +` is a temporary workaround for a Swift 2.0 compiler error. This workaround should
// be removed once the following radar has been resolved:
// - http://openradar.appspot.com/radar?id=6082025006039040
//======================================================================================================
let pinnedCertificatesDataArray = certificateDataForCertificates([] + pinnedCertificates)
outerLoop: for serverCertificateData in serverCertificatesDataArray { outerLoop: for serverCertificateData in serverCertificatesDataArray {
for pinnedCertificateData in pinnedCertificatesDataArray { for pinnedCertificateData in pinnedCertificatesDataArray {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册