Webview fails loading http page, https required on iOS

Hi community,

Keetiz is a cashback application. Our app allows earning cashback from purchase at our partners websites. They are displayed in a webview and the final site URL in the redirections chain is coming from an affiliation platform, we have no control over it.

On iOS, when the redirection chain leads to a http page, it wont load. On Android and Simulator, it works fine.

This problem happens with build 3580 using WKWebView and also with build 3552 using UIVewView.

Oddly enough, when comparing with the Android version, I noticed Android automatically converts to https.

I cannot perform a manual replacement in the URL, because I think this might break the affiliation chain (referal loss)

Here is a code snippet to test this in a blank project

myWebView = native.newWebView( display.contentCenterX, display.contentCenterY, display.actualContentWidth, display.actualContentHeight-100) myWebView:request("http://www.hotel-bb.com/fr/home.htm") -- this one fails --myWebView:request("https://www.hotel-bb.com/fr/home.htm") -- this one succeeds

Has anyone experienced this problem already ? Would there be a way to prevent webview loading failure in the build.settings ?

Best regards

Pascal Bancel

Never mind, I found the solution here

https://docs.coronalabs.com/guide/hardware/appleATS/index.html

Sorry for the trouble.

If your app has anything to do with money or personal information and it sends users on web redirect loops, then why on Earth wouldn’t you require https by default at every step of the way? At worst, you leave your users, yourself and your clients vulnerable.

Never mind, I found the solution here

https://docs.coronalabs.com/guide/hardware/appleATS/index.html

Sorry for the trouble.

If your app has anything to do with money or personal information and it sends users on web redirect loops, then why on Earth wouldn’t you require https by default at every step of the way? At worst, you leave your users, yourself and your clients vulnerable.

This is handled by the websites themselves : http links are automatically redirected to https, but iOS would not open the unsecure link and redirection would not happen…