“发生 ssl 错误,无法与服务器建立安全连接”仅在 phone 上连接到内部开发服务器

“an ssl error has occurred and a secure connection to the server cannot be made” connecting to Internal Development Server on phone only

我开发了一个连接到内部 Web 服务器的 iOS 应用程序。当我使用模拟器时,它工作正常,但是当我在 iPhone 上构建相同的应用程序时,它会给我一条错误消息“发生 ssl 错误,无法建立与服务器的安全连接。 " 为什么错误只发生在 iPhone 而不是在模拟器中?

这是我的环境 Xcode 8.2 iOS 10.3 Objective C -- 我的客户端代码默认使用 ATS AFNetworking Framework 3.1 Web 服务器——仅支持 TLS 1.2 Web 服务器证书尚不支持前向保密。

可能是因为我的证书不符合 ATS 标准?

我从 Apple

读到这个 ​​document 之后
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>Your Domain</key>   
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>                
            <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
            <false/>
        </dict>
    </dict>
</dict>

我的应用程序现在可以在设备上运行。我在服务器上的证书尚未准备好前向保密。