I have native app with an embedded Cordova Web view, and the app loads fine over the default file scheme. But when setting the scheme and hostname config preferences, the web view points to about:blank.
<preference name="scheme" value="app" />
<preference name="hostname" value="localhost" />
What we know...
Cordova (6.2.0) detects that the scheme is not file, and loads the
CDVURLSchemeHandlerplugin. Its initializer is called.CDVWebViewEngine.loadRequesttries to loadapp://localhost/index.html, and web view's scheme handler is set ([((WKWebView*)_engineWebView).configuration urlSchemeHandlerForURLScheme:@"app"]return non-null). YetstartURLSchemeTaskmethod is never called. Why not???Just to be sure, I added the custom scheme to Info.plist:
<key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>app</string> </array> <key>CFBundleURLName</key> <string>com.myapp</string> </dict> </array>
What did I miss?