Nativescript-angular: Unable to load 3D Secure page with ios webview

Created on 10 May 2018  路  3Comments  路  Source: NativeScript/nativescript-angular

Hello,

The webview component doesn't render 3D secure pages.

<WebView src="https://www.denizbank.com/3ds/default.aspx"></WebView>

The page above works fine on desktop and mobile browsers. Even it renders correctly on nativescript's playground/preview apps.

But when we try to run it locally with;

tns run ios

it renders blank page.

Tried to debug with _WebView.loadFinishedEvent_ when we try to visit the url above the event callback never triggers.

Here is a playground link.

P.S: nativescript preview renders the page fine.

tns version 4.0.1

Most helpful comment

@NickIliev thanks for the answer it solves the issue. This was working fine without the NSAllowsArbitraryLoads conf for most of the https pages.

All 3 comments

@angularturk the thing is that on iOS you should explicitly allow the loading of HTTPS pages (which is done by default in Playground).

This can be done either by entirely allowing the arbitrary loads (not recommended by Apple)as follows:
in your App_Resources/iOS/info.plist file add

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

The proper way to do that is to add only the domains you are going to use and trust as done here

@NickIliev thanks for the answer it solves the issue. This was working fine without the NSAllowsArbitraryLoads conf for most of the https pages.

@NickIliev thanks for the answer. It worked for me.

Was this page helpful?
0 / 5 - 0 ratings