1

I started to learn React Native and tried to made simple app. I've made server on Java and FE on React Native. And now i have a problem. WebView in React Native doesn't open the Https URL without ssl certificate. I made a self certificate but still NSURLErrorDomain -1202

Is it possible to turn off this notification? I can't make the trusted certificate, because i don't have a host and have to deploy my app only on localhost.

screenshot

1 Answer 1

1
<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>

Add this in your Info.plist and in place of linkedin.com give your URL

Sign up to request clarification or add additional context in comments.

1 Comment

Problem solved by using your code and WKWebView github.com/CRAlpha/react-native-wkwebview

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.