[
https://issues.apache.org/jira/browse/CB-5079?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14177715#comment-14177715
]
Shazron Abdullah commented on CB-5079:
--------------------------------------
Thinking that this is better off in CDVPlugin, for 4.0
> Add settingsForKey function in CDVCommandDelegate (for plugins)
> ---------------------------------------------------------------
>
> Key: CB-5079
> URL: https://issues.apache.org/jira/browse/CB-5079
> Project: Apache Cordova
> Issue Type: Improvement
> Components: iOS
> Affects Versions: Master
> Reporter: Shazron Abdullah
> Priority: Minor
> Fix For: 4.0.0
>
>
> Because the CDVConfigParser lowercases the keys for settings, everytime a
> plugin wants to get a setting, it has to remember to lowercase the key (which
> can be error-prone).
> Have a function in the CDVCommandDelegate *settingsForKey* that helps with
> this, see example here:
> https://github.com/apache/cordova-labs/blob/eea7f9fdae739486424ebb8f3ca36ea8bf04730e/statusbar/src/ios/CDVStatusBar.m#L30-L33
> However -- if a plugin uses this, it will not be compatible with earlier
> Cordova versions < X if this gets implemented in X. So -- I'm hesitant to add
> this unless we can find a "workaround" so it works in all Cordova versions.
> Maybe through some runtime magic / categories etc, not sure yet, shouldn't be
> impossible since it's just a helper function.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]