public override void DetectWebViewLoadFinishedEvent(UIApplication application, NSDictionary launchOptions) { UIApplicationState applicationState = application.ApplicationState; ((UnityUI_iOSViewController_UIWebView)MainViewController()).webView.LoadFinished += delegate { #if DEBUG log("************** WEBVIEW LOAD FINISHED"); #endif if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { UIView.AnimationsEnabled = true; //enable again animation in all view (see UnityUI_iOSViewController_UIWebView#loadWebView for details) } // inform other weak delegates (if exist) about the web view finished event IPhoneServiceLocator.WebViewLoadingFinished(applicationState, launchOptions); // The NSDictionary options variable would contain any notification data if the user clicked the 'view' button on the notification // to launch the application. // This method processes these options from the FinishedLaunching. processLaunchOptions(launchOptions, true, applicationState); // Processing extra data received when launched externally (using custom scheme url) processLaunchData(); }; }
/* * public override void DecidePolicy (WKWebView webView, WKNavigationAction navigationAction, Action<WKNavigationActionPolicy> decisionHandler) * { * Console.WriteLine ("**** DecidePolicy****: " + navigationAction.Request); * * webView.LoadRequest (navigationAction.Request); // testing, it blocks the request load * * } */ public override void DidFinishNavigation(WKWebView webView, WKNavigation navigation) { #if DEBUG SystemLogger.Log(SystemLogger.Module.GUI, "AppverseWKNavigationDelegate ************** WEBVIEW LOAD FINISHED"); #endif if (_appDelegate != null && _application != null) { UIApplicationState applicationState = _application.ApplicationState; // inform other weak delegates (if exist) about the web view finished event IPhoneServiceLocator.WebViewLoadingFinished(applicationState, _launchOptions); // The NSDictionary options variable would contain any notification data if the user clicked the 'view' button on the notification // to launch the application. // This method processes these options from the FinishedLaunching. _appDelegate.processLaunchOptions(_launchOptions, true, applicationState); // Processing extra data received when launched externally (using custom scheme url) _appDelegate.processLaunchData(); } else { #if DEBUG SystemLogger.Log(SystemLogger.Module.GUI, "AppverseWKNavigationDelegate ************** Application Delegate is not accessible. Stop processing notifications and/or launch data"); #endif } }