在没有 ssl 证书的 WebView 中打开 Https URL

Open Https URL in WebView without ssl certificate

我开始学习 React Native 并尝试制作简单的应用程序。 我在 Java 上制作了服务器,在 React Native 上制作了 FE。现在我有一个问题。没有 ssl 证书,React Native 中的 WebView 无法打开 Https URL。我做了一个自我证书,但仍然是 NSURLErrorDomain -1202

是否可以关闭此通知?我无法制作受信任的证书,因为我没有主机并且只能在本地主机上部署我的应用程序。

screenshot

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
        <key>NSAllowsArbitraryLoadsInWebContent</key>
        <true/>
        <key>NSExceptionDomains</key>
        <dict>
            <key>linkedin.com</key>
            <dict>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
                <key>NSIncludesSubdomains</key>
                <true/>
            </dict>
        </dict>
    </dict>

将此添加到您的 Info.plist 并代替 linkedin.com 给您的 URL