You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Shazron Abdullah (JIRA)" <ji...@apache.org> on 2013/10/15 17:38:42 UTC
[jira] [Updated] (CB-5079) Add settingsForKey function in
CDVCommandDelegate (for plugins)
[ https://issues.apache.org/jira/browse/CB-5079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah updated CB-5079:
---------------------------------
Issue Type: Improvement (was: Bug)
> 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
>
> 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.1#6144)