[ 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to