class : MonoBehaviour, IWebView

The IWebView implementation used by 3D WebView for iOS. This class also includes extra methods for iOS-specific functionality.


Public methods


static string GetFileUrlForBundleResource(string fileName)

Returns a file URL for resource included in the iOS app bundle. This is useful for getting a file URL to a local file so that it can be loaded via IWebView.LoadUrl().


var fileUrl = iOSWebView.GetFileUrlForBundleResource("my-static-files/my-webpage.html");


static void SetCustomUriSchemesEnabled(bool enabled)

By default, iOSWebView blocks requests for custom schemes (ex: myapp://myaction?data=foo) in order to prevent sites like Wikipedia and YouTube from using URIs with custom schemes to launch their native apps via a webpage. However, if you want to override this behavior (for example, to use your own custom URI scheme within your app), you can enable custom URI schemes with this method. When a custom URI scheme is loaded (probably via JavaScript), the webview emits a UrlChanged event with the custom URL.


static void SetNativeKeyboardEnabled(bool enabled)

Enables or disables the native iOS on-screen keyboard for new webviews. The default is disabled.