0

plist で次のコードを使用して、サーバーの例外を App Transport Security プロトコルに追加しています。

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>172.16.4.139</key>
        <dict>
            <key>NSIncludesSubdomains</key>
            <true/>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSExceptionRequiresForwardSecrecy</key>
            <true/>
            <key>NSExceptionMinimumTLSVersion</key>
            <string>TLSv1.2</string>
            <key>NSThirdPartyExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
            <false/>
            <key>NSThirdPartyExceptionMinimumTLSVersion</key>
            <string>TLSv1.2</string>
            <key>NSRequiresCertificateTransparency</key>
            <false/>
        </dict>
    </dict>
</dict>

しかし、「 App Transport Security ポリシーで安全な接続の使用が必要なため、リソースを読み込めませんでした。」というメッセージが表示されます。

私は何を間違っていますか?

4

1 に答える 1

2

ハードコーディングされた IP アドレスは、iOS 9 では機能しません。

この回答を確認してください。

于 2015-09-23T07:46:47.130 に答える