Skip to content
Sefa Ilkimen edited this page Jun 25, 2020 · 4 revisions

How do I setup SSL / TLS pinning?

Q: How do I setup SSL / TLS pinning for my app with this plugin?

A: Please read the documentation carefully README.md#setServerTrustMode. It's very important to have the certificates encoded correctly!

My SSL cert pinning is not working on iOS

Q: I'm trying to setup SSL cert pinning. It's working on Android, but failing on iOS "Cancelled". What's the problem?

A: If it's working on Android but not on iOS it's most likely because you're using a Base64 (PEM formatted) cert (in your App, not the server side). Please read the docu for further details.

UIWebView and WKWebView

Q: Does this plugin work with UIWebView and WKWebView?

A: Yes, it's working with both kind of web views.

What's about CORS?

Q: Is this plugin subject to CORS restrictions?

A: No, this plugin doesn't respect CORS restrictions. Therefore, it's possible to load data from any remote source even if your page was loaded from a local source.

Loading local files

Q: Can this plugin be used to load local files (cdvfile://localhost/bundle/www/file.js, file:///...)?

A: No, this plugin is not meant to be used for local resources. It's supporting http:// and https:// protocols. Please use XMLHttpRequest or cordova file plugin instead.

Is this plugin part of the Ionic project?

Q: Is this plugin part of the Ionic project? Are you an Ionic developer?

A: This plugin is used by the Ionic community very extensively. Especially, because it supports circumventing CORS issues introduced by the WKWebView. And it's one of the ionic-native community plugins. But I am not an Ionic developer, I'm not working for Drifty Co.!

Sharing cookies with InAppBrowser / native cookie storage

Q: How do I share my cookies with InAppBrowser / native cookie storage used by the web view?

A: This plugin uses tough-cookie (see README) for cookie management and stores them in the local storage. But actually it's possible to copy cookies, check out #330 for details.