Reputation: 173
I am working in a cross-platform application.
I use a cross-platform webview https://github.com/SKLn-Rad/Xam.Plugin.Webview
it is working fine on Android
but nothing works on IOS
No events fire at all, even the "OnNavigationError" event.
I used a "WebRequest" to check if I can access the internet, and it works fine, no connection problems.
I set WidthRequest and HeightRequest for the webview.
also I set NS security for IOS project
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
I tried "https://www.google.com" and it did not work.
The problem for me is that is just silent, no errors at all.
Can anyone help, please?
Regards
Upvotes: 1
Views: 1549
Reputation: 173
Sorry, I find the solution :)
I was just missing a single line in AppDelegate.cs
on IOS project
this is the problem's solution in case someone else faces it like me
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
..
Xam.Plugin.WebView.iOS.FormsWebViewRenderer.Initialize();
..
}
Upvotes: 2