Note: groups.io will be down for maintenance on Monday, September 26th, starting at 9AM Pacific Time (4PM Monday September 26, 2022 UTC), for approximately one hour.
Schemes in WKWebView
Gerriet M. Denkmann
I created MySchemeHandler, which implements the WKURLSchemeHandler protocol; methods just do NSLog().
NSString *myScheme = @"myScheme";
[wkWebView.configuration setURLSchemeHandler: mySchemeHandler forURLScheme: myScheme];
NSURLComponents *uc = [ [ NSURLComponents alloc ] init ];
uc.scheme = myScheme;
uc.path = @“/abcXYZ";
NSURLRequest *ur = [ NSURLRequest requestWithURL: uc.URL ];
WKNavigation *wn = [ wkWebView loadRequest: ur ];
but nothing happens; MySchemeHandler gets never called.
What am I missing?