[jira] [Commented] (CB-8463) StatusBarPlugin Issue scrollView not found when using WKWebView
[ https://issues.apache.org/jira/browse/CB-8463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14359456#comment-14359456 ] Shazron Abdullah commented on CB-8463: -- Ouch - that's embarrassing :) Probably pre-3.0 code that we never bothered to update to pluginInitialize when 3.x rolled around. What do you mean by "two-stage initialization"? Are you suggesting we still keep support for initWithWebView somehow? I would think that moving to a major version that would give us latitude to break this dependency especially since it was never publicly documented. I'm not opposed to it, and it's not a hard technical problem -- we could start a discussion on the ML regarding this for sure. Inspecting how the initialization works, the initWithWebView(Engine) is called first, then pluginInitialize not soon after, so there won't be timing issues related to this (hopefully). For initWithWebViewEngine, I'm going to remove it from the public API and put it in a private header instead, so there won't be this problem in the future. > StatusBarPlugin Issue scrollView not found when using WKWebView > --- > > Key: CB-8463 > URL: https://issues.apache.org/jira/browse/CB-8463 > Project: Apache Cordova > Issue Type: Sub-task > Components: Plugin Statusbar > Environment: iOS 8 >Reporter: Holly Schinsky >Assignee: Shazron Abdullah > > When using the WKWebView Plugin and the StatusBarPlugin together, the > following error is received from the *CDVStatusBar.m* class: > {code} > CDVStatusBar.m:128:18: error: > property 'scrollView' not found on object of type 'UIView *' > self.webView.scrollView.scrollsToTop = NO; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8463) StatusBarPlugin Issue scrollView not found when using WKWebView
[ https://issues.apache.org/jira/browse/CB-8463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14358614#comment-14358614 ] Ian Clelland commented on CB-8463: -- I didn't see that line in the docs -- thanks for pointing it out. Unfortunately, we're breaking our own rule several times :) It's not just battery-status -- apparently that was just XCode showing me one error at a time. Several of our core plugins use it: * battery-status * contacts * device-orientation * file * geolocation * globalization * inappbrowser * media-capture * network-information Two-stage initialization is probably the best way to do it in iOS, as long as it's backwards-compatible. (We ran into a very similar situation with Android, and had to do lots of reflection to get around it, because there wasn't another backwards-compatible solution) We'll just have to make sure we get those out some time before we push 4.0.0 :) > StatusBarPlugin Issue scrollView not found when using WKWebView > --- > > Key: CB-8463 > URL: https://issues.apache.org/jira/browse/CB-8463 > Project: Apache Cordova > Issue Type: Sub-task > Components: Plugin Statusbar > Environment: iOS 8 >Reporter: Holly Schinsky >Assignee: Shazron Abdullah > > When using the WKWebView Plugin and the StatusBarPlugin together, the > following error is received from the *CDVStatusBar.m* class: > {code} > CDVStatusBar.m:128:18: error: > property 'scrollView' not found on object of type 'UIView *' > self.webView.scrollView.scrollsToTop = NO; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8463) StatusBarPlugin Issue scrollView not found when using WKWebView
[ https://issues.apache.org/jira/browse/CB-8463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14357398#comment-14357398 ] Shazron Abdullah commented on CB-8463: -- Hmm, this is a quandary. Ideally I don't want plugins to break, but I don't see why plugins need to override this, they should use pluginInitialize instead: https://github.com/apache/cordova-ios/blob/b3c26fcd598da7c84f020f5a6b9309fe638cbb5d/CordovaLib/Classes/CDVPlugin.m#L38 I realize it's a public API, but it really is more of a "package" API for use by CordovaLib to instantiate plugins. Took a look at the battery status plugin, the contents of its initializer function really should go in pluginInitialize. In fact, that's what our docs say for plugin dev: "There is no designated initializer for plugins. Instead, plugins should use the pluginInitialize method for their startup logic." http://cordova.apache.org/docs/en/4.0.0/guide_platforms_ios_plugin.md.html#iOS%20Plugins Changing the use to pluginInitialize will not break the plugins for cordova-ios 3.x as well since pluginInitialize is supported in that series. When making the API change, I considered that the 4.0 major version bump allowed us to get rid of some of this type of technical debt, especially since the intended use was not as an initializer for plugins themselves. We could put out an Upgrade note here, as well as blog about it: https://github.com/apache/cordova-ios/tree/master/guides > StatusBarPlugin Issue scrollView not found when using WKWebView > --- > > Key: CB-8463 > URL: https://issues.apache.org/jira/browse/CB-8463 > Project: Apache Cordova > Issue Type: Sub-task > Components: Plugin Statusbar > Environment: iOS 8 >Reporter: Holly Schinsky >Assignee: Shazron Abdullah > > When using the WKWebView Plugin and the StatusBarPlugin together, the > following error is received from the *CDVStatusBar.m* class: > {code} > CDVStatusBar.m:128:18: error: > property 'scrollView' not found on object of type 'UIView *' > self.webView.scrollView.scrollsToTop = NO; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8463) StatusBarPlugin Issue scrollView not found when using WKWebView
[ https://issues.apache.org/jira/browse/CB-8463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14357029#comment-14357029 ] Ian Clelland commented on CB-8463: -- This patch seems to break (at least) the battery-status plugin -- it uses the *public* api - (instancetype)initWithWebView:(UIView*)theWebView which is removed by this patch, and I don't see an easy way to back-fill it. I don't think there's a way to get at the WebViewEngine from the bare UIView now. Is there a plan for backwards compatibility? There are probably other third-party plugins affected as well. > StatusBarPlugin Issue scrollView not found when using WKWebView > --- > > Key: CB-8463 > URL: https://issues.apache.org/jira/browse/CB-8463 > Project: Apache Cordova > Issue Type: Sub-task > Components: Plugin Statusbar > Environment: iOS 8 >Reporter: Holly Schinsky >Assignee: Shazron Abdullah > > When using the WKWebView Plugin and the StatusBarPlugin together, the > following error is received from the *CDVStatusBar.m* class: > {code} > CDVStatusBar.m:128:18: error: > property 'scrollView' not found on object of type 'UIView *' > self.webView.scrollView.scrollsToTop = NO; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-8463) StatusBarPlugin Issue scrollView not found when using WKWebView
[ https://issues.apache.org/jira/browse/CB-8463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14317183#comment-14317183 ] Shazron Abdullah commented on CB-8463: -- This is because in 4.x the webView property is now a UIView to accommodate either the UIWebView or WKWebView. The fix is to test the webView if it respondsToSelector @selector(scrollView) and if it does, then set scrollsToTop, etc. > StatusBarPlugin Issue scrollView not found when using WKWebView > --- > > Key: CB-8463 > URL: https://issues.apache.org/jira/browse/CB-8463 > Project: Apache Cordova > Issue Type: Sub-task > Components: Plugin Statusbar > Environment: iOS 8 >Reporter: Holly Schinsky > > When using the WKWebView Plugin and the StatusBarPlugin together, the > following error is received from the *CDVStatusBar.m* class: > {code} > CDVStatusBar.m:128:18: error: > property 'scrollView' not found on object of type 'UIView *' > self.webView.scrollView.scrollsToTop = NO; > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org