Mansoor
Mansoor

Reputation: 15

Xamarin Webview is not working properly

I'm building xamarin.forms application where i intend to load asp.net mvc application in web view (iOS) . Here is my code.

    WebView webview = new WebView();
    webview.Source = new UrlWebViewSource
        {
            Url = "https://hrworksplus.com/test/test.html"
        };
        MainPage = new ContentPage
        {
            Content = webview
        };

When i give my application's url, emulator doesn't load anything but if i give google.com link, it works perfectly fine in the right away. Any idea what problem would be, my web application is working in browser though.

Regards TA

Upvotes: 0

Views: 1396

Answers (1)

techniko27
techniko27

Reputation: 11

The changes in the file info.plist:

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

solved my problem to play html5 Videos in the xamarin.forms Webview on iOS Devices. Like Gerald Versluis said, it occurs an error message about insecure connection in the debugging console, while the video just won't play.

Upvotes: 1

Related Questions