Thank you
As everyone probably realizes, I am trying to hack and slash my way forward through the problems.
Seems Lazarus does not like this construct:
TmsWKWebViewCore = objcclass external(WKWebView)
public
{ available in macos 10.11, ios 9.0 }
procedure setCustomUserAgent(newValue: NSString); message 'setCustomUserAgent:';
function customUserAgent: NSString; message 'customUserAgent';
end;
TmsWKWebView = objcclass(TmsWKWebViewCore, WKScriptMessageHandlerProtocol)
public
procedure userContentController_didReceiveScriptMessage(userContentController: WKUserContentController; message_: WKScriptMessage);
end;
(gives a bunch of error linker errors objc_class)
However using
// while we use setNavigationDelegate, that solution is not possible with *WKScriptMessageHandlerProtocol* and need to implemented in main class
TmsWKWebView = objcclass(TmsWKWebViewCore, WKScriptMessageHandlerProtocol)
public
{ available in macos 10.11, ios 9.0 }
procedure setCustomUserAgent(newValue: NSString); message 'setCustomUserAgent:';
function customUserAgent: NSString; message 'customUserAgent';
public
procedure userContentController_didReceiveScriptMessage(userContentController: WKUserContentController; message_: WKScriptMessage);
end;
also causes problems since compiler then expects the UserAgent functions to be implemented and not externally bound.