Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Custom Renderer not working on Simulator.

$
0
0

We have a custom renderer (ios) that works on an iphone but not on the simulator. DidReceiveServerRedirectForProvisionalNavigation never gets called. I have tried all the Linker behavior settings (Don't Link, Link Framework SDKs only, Link All) - non worked. Any ideas?

[assembly: ExportRenderer(typeof(HybridWebView), typeof(LoginHybridWebViewRenderer))]
namespace OurProject.Mobile.iOS
{
using System.IO;
using Foundation;
using UIKit;
using Xamarin.Forms.Platform.iOS;

public class LoginHybridWebViewRenderer: XLabs.Forms.Controls.HybridWebViewRenderer
{
    [Export("webView:didReceiveServerRedirectForProvisionalNavigation:")]
    public void DidReceiveServerRedirectForProvisionalNavigation(WKWebView webView, WKNavigation navigation)
    {
        this.DidStartProvisionalNavigation (webView, navigation);
    }
}

}

I have added this to the AppDelegate:
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
new LoginHybridWebViewRenderer ();
...


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>