react-native-webview: NSURLErrorDomain - 1202 (Certificate)
Good afternoon,
just saw this library today, I’m still and originally using Webview from "react-native"
, then I saw your repo, so I wanted to give it a try.
However, I’m stuck with this error when the Webview try to launch ⏬

It’s weird, 'cos I don’t get this error with the original Component imported from React-Native
…
I tried to add an NSExceptionDomains
field in my Info.plist, but didn’t work…
Does anyone have any ideas about how to resolve this, or for example, ignoring certificates restriction when Webview’s loading ?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 14
- Comments: 33 (1 by maintainers)
After having added the following to
NSAppTransportSecurity
in our target’s Info.plist file:And rebuilding the project, it seems to be working on the simulator again 🤞
Did anyone find any solution?
but if useWebKit set false will use
UIWebView
UIWebView
is deprecated and will be removed soonwhat should I do…
Glad to see that I’m finally not the only one 😉
Sorry, I actually lost the access to my original account (@MayeuldP ), so here I am again (sorry for the delay) :
I tried with the very basic example :
It’s actually working well for Android, on Simulator and Real devices (both) However on iOS, I get the same error with the screen that I added in the first post.
This is the kind of errors that I get in the log of the simulator :
And here is the error that I get in the Chrome Debugger.
0.55.3
import { WebView } from "react-native";
I have the strange feeling that this problem has something to deal with xCode … 🧐🤔
If anyone else comes across this with error -1202, my problem was my antivirus was issuing invalid certificates to the simulator, open safari and surf to the website, if it has an issue, view certificate, if it says it’s not trusted and you can see the certificate is by your antivirus, turn your antivirus off, hope this helps someone out there
The original Webview component works fine, this is only since changing to the community version
I ran into this too. On simulator it gave me that ^^ error, but when I ran it on a iOS device the url loaded fine.
Here’s the full error object:
It appears that it didn’t works on Simulator on another network connection, however it worked on a real device (iOS), weird and quite contraining but ok on the end… You can close the issue !
We’ve just updated to the community webview over that from react-native directly and started to get this issue.
It may only be on the simulator but it’s a huge blocker as in one case we use a webview for some authentication in the 1st step of an app - and can’t get around it without some hackish code inserting credentials to redux 😓
Did the trick ! Thank you Sir !
the community version is not working because it set useWebKit to true by default. if u set useWebKit to false on community version. it will be working
So I have fixed my own issue following this guide. What I did wrong in the first place was creating the external folder and put in the web files physically via finder instead of adding them via Xcode.