Custom plugin is not displayed


Hi all!

I created a WKWebView plugin for iOS, but it does not displays in the application. No error throws. In the log all messages (such as ‘onLoaded’, ‘Success’, etc) normally displayed.

I don’t understand what’s wrong here. Please, help.


Wish I knew iOS enough and the NS core for iOS View plugins and I could be useful. Sorry. Your code looks good though :slight_smile:


Native code has no notion of the “~/” path, so you need to convert it to a real file path. How about this?

// import
const utils = require("utils/utils");
const fs = require("file-system");

// instead of your current 'loadUrl' function:
if (url.indexOf("~/") === 0) {
  url = fs.path.join(fs.knownFolders.currentApp().path, url.replace("~/", ""));

let myURL = NSURL.fileURLWithPath(url);
this._ios.loadFileURLAllowingReadAccessToURL(myURL, myURL);


Thanks Eddy, is works :slight_smile: