How to override ios webview to own



I am trying override webview of ios to this

for setting cookie to webview

how it can be achieved?
I have tried it on onloadstarted event


To implement cookies in {N} iOS WebView, you shall directly copy the cookie related code from example,

and apply it on loaded event like

    var wkUController  = webView.nativeView.configuration.userContentController;
    var wkCookieScript = WKUserScript.alloc().initWithSourceInjectionTimeForMainFrameOnly(cookieScript, 0, false);

I didn’t try this myself, in case if you face any issues let me know.


Not able to do that
as cookie will be loaded after rendering instead I want to add cookie before that


You mean rendering of webpage, it’s totally on your control - you can decide when you render after or before.