Alamofire错误kCFStreamErrorDomainSSL,-9824

时间:2017-03-27 16:28:00

标签: ios swift alamofire

我正在使用Alamofire来连接web service。似乎server无效证书。我希望alamofire ignore这个invalid cert。我将以下值添加到info.plist

<dict>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key>example.com</key>
            <dict>
                <key>TemporaryExceptionMinimumTLSVersion</key>
                <string>TLSv1.2</string>
                <key>ExceptionRequiresForwardSecrecy</key>
                <false/>
                <key>IncludesSubdomains</key>
                <true/>
                <key>ExceptionAllowsInsecureHTTPLoads</key>
                <true/>
            </dict>
        </dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>

但我仍然遇到这个问题。我还应该做些什么才能允许invalid cert?

更新:仍有同样的问题。

0 个答案:

没有答案