dpogue commented on issue #1399:
URL: https://github.com/apache/cordova-ios/issues/1399#issuecomment-2298208548

   I'd like to remove this (and have a PR to do so) but unfortunately this is 
still used by a large number of 3rd party plugins. The problem is that the 
`CDVPlugin` class has a `webView` property that is a `UIView*`, and we can't 
type it to a more specific type because the exact type of WebView being created 
isn't known at compile time (because WebView implementations are provided by 
plugins).
   
   This category extension was originally added to smooth over the transition 
from `UIWebView` to `WKWebView`, both of which have a `scrollView` property but 
which wouldn't be accessed via the more generic `UIView*`.
   
   In an ideal world, plugins wouldn't need to care about the internal 
implementation details of the web view or touch its scroll view directly, but 
sadly most Cordova plugins exist due to the lack of an ideal world. 😞 
   
   So removing this entirely is definitely not feasible in the next major 
version. I can mark it as deprecated, but that still leaves plugins without a 
good solution (other than copy-pasting this implementation wherever they need 
it), and doesn't solve the problem of this interfering with Swift view 
subclasses.
   
   
   @hbordersTwitch Any suggestions for how we might be able to improve this 
situation for Swift without breaking compatibility with the existing ecosystem?


-- 
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: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to