Reply To: UIWebView deprecation

Welcome! Forums Unity Plugins In-App Web Browser UIWebView deprecation Reply To: UIWebView deprecation


I am confused about the new communication mechanism. I start typing webkit and it isn’t defined.

Here is some of my code:

	private void Start ()
		InAppBrowser.ClearCache ();
		InAppBrowserBridge bridge = FindObjectOfType<InAppBrowserBridge> ();
		bridge.onJSCallback.AddListener (OnMessageFromJS);
		bridge.onBrowserStartedLoading.AddListener (OnBrowserStartedLoading);

	private void Awake ()
		InAppBrowser.DisplayOptions options = new InAppBrowser.DisplayOptions ();
		options.displayURLAsPageTitle = false;
		options.pageTitle = "My App";
		options.hidesTopBar = true;

		InAppBrowser.OpenURL ("", options);

Here is a place where I send some Json to the browser javascript:

InAppBrowser.ExecuteJS("$nuxt.messageFromUnity('{\"success\": \"" + success + "\"}');");