Hi,
I trying to use a webview on Mac + Forms (not xamarin.mac), but I can't manage to use http connection (for dev) as documented.
It work perfectly fine when I do the build thing for iOS (same code)
Here is what I tried settings the info.plist as describe here :
https://forums.xamarin.com/discussion/52719/xamarin-forms-webview-not-loading-url or /docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/ats
here is my code
namespace MyWebviewApp
open Xamarin.Forms
type App() =
inherit Application()
let stack = StackLayout(Orientation = StackOrientation.Vertical, VerticalOptions = LayoutOptions.StartAndExpand)
let label = Label(XAlign = TextAlignment.Center, Text = "Refresh")
let webviewSource = UrlWebViewSource(Url = "http://mysite.net") // address to localhost
let webview = WebView(
Source = webviewSource,
VerticalOptions = LayoutOptions.FillAndExpand,
HorizontalOptions = LayoutOptions.FillAndExpand,
WidthRequest = 1000.0,
HeightRequest = 1000.0
)
do
stack.Children.Add(webview)
stack.Children.Add(label)
base.MainPage <- ContentPage(Content = stack)
Is there any thing specific for desktop mac and http connection I missed?