You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2013/02/13 22:14:12 UTC

[jira] [Resolved] (CB-2433) Deprecate window.Settings

     [ https://issues.apache.org/jira/browse/CB-2433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve resolved CB-2433.
-------------------------------

    Resolution: Fixed

https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;a=commit;h=81e3332adaa6524da20099a68ed7625c5884cf89
                
> Deprecate window.Settings
> -------------------------
>
>                 Key: CB-2433
>                 URL: https://issues.apache.org/jira/browse/CB-2433
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Andrew Grieve
>            Assignee: Andrew Grieve
>            Priority: Minor
>             Fix For: 2.5.0
>
>
> @implementation CDVDevice
> - (void)getDeviceInfo:(CDVInvokedUrlCommand*)command
> {
>     /* Settings.plist
>      * Read the optional Settings.plist file and push these user-defined settings down into the web application.
>      * This can be useful for supplying build-time configuration variables down to the app to change its behavior,
>      * such as specifying Full / Lite version, or localization (English vs German, for instance).
>      */
>     // TODO: turn this into an iOS only plugin
>     NSDictionary* temp = [CDVViewController getBundlePlist:@"Settings"];
>     if ([temp respondsToSelector:@selector(JSONString)]) {
>         NSString* js = [NSString stringWithFormat:@"window.Settings = %@;", [temp JSONString]];
>         [self.commandDelegate evalJs:js];
>     }
> No docs mention the feature.
> You could accomplish x-platform & without a plugin by XHR'ing a .json file from your app directory.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira