gpt4 book ai didi

ios - Xcode:应用程序传输安全

转载 作者:行者123 更新时间:2023-11-28 19:37:49 25 4
gpt4 key购买 nike

一开始无法请求网络,所以得到了方法:

<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>

但是出现了一个问题:

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

有人知道吗?帮助!

最佳答案

试试这个。

    <key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>yourserver.com</key>
<dict>
<!--Include to allow subdomains-->
<key>NSIncludesSubdomains</key>
<true/>
<!--Include to allow HTTP requests-->
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<!--Include to specify minimum TLS version-->
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>TLSv1.1</string>
</dict>
</dict>
</dict>

关于ios - Xcode:应用程序传输安全,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37155981/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com