Shazron Abdullah created CB-5079:
------------------------------------
Summary: Add settingsForKey function in CDVCommandDelegate (for
plugins)
Key: CB-5079
URL: https://issues.apache.org/jira/browse/CB-5079
Project: Apache Cordova
Issue Type: Bug
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)