erisu commented on issue #1658: URL: https://github.com/apache/cordova-ios/issues/1658#issuecomment-4563357987
I don't believe this is possible using `WKURLSchemeHandler`. `WKURLSchemeHandler` can only register custom URL schemes. WebKit does not allow apps to register built-in reserved schemes such as `http` or `https`, since those are already handled internally by WebKit. Apple's documentation for [setURLSchemeHandler(_:forURLScheme:)](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/seturlschemehandler(_:forurlscheme:)?language=objc) also notes: > "It is a programmer error to register a handler for a scheme WebKit already handles, such as https, and this method raises an NSInvalidArgumentException if you try to do so." One possible alternative would be running a local web server inside the app and serving content over HTTP or HTTPS. However, this is outside the scope of what Cordova currently provides, and supporting it would likely add additional complexity around networking, certificate handling, app lifecycle management, and platform-specific behavior. There may already be Cordova plugins that support this type of functionality, although I’m not personally familiar with any specific implementations. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
