gpt4 book ai didi

ios - react native Webview NSURLErrorDomain 1022

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:54:12 42 4
gpt4 key购买 nike

我正在尝试在 Web View 组件中显示自定义 URL(它们不是异常(exception)域中的 URL,它们是其他域,我并不总是知道它们的域)但似乎无法修复 Apple 的错误 1022 : 无法加载资源,因为 App Transport Security 策略要求使用安全连接

我的 Info.plist 文件具有以下内容:

  <key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>akamaihd.net</key>
<dict>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
<key>facebook.com</key>
<dict>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
<key>fbcdn.net</key>
<dict>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
<key>needl-app.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>

我做错了什么?

最佳答案

尝试将您的域 key 替换为:

<key>www.akamaihd.net</key>

<key>www.faceboook.com</key>
这似乎为我解决了问题。此外,对于 facebook,只要在你的 WebView 中路由到 https://www.facebook.com 就可以将其删除。

关于ios - react native Webview NSURLErrorDomain 1022,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36043683/

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