chester123 0 Newbie Poster

Hi,

I am using phonegap framework for ios development using Jquery+html+css.

I need to save my username and password in iphone default setting, for one time login.

I have implemented (window.plugins.applicationPreferences.set) and (window.plugins.applicationPreferences.get) in my js file, but phonegap plugins not supporting (windows,plugins).

window.plugins.applicationPreferences.get('name_identifier', function(result) {
        alert("We got a setting: " + result);
    }, function(error) {
        alert("Failed to retrieve a setting: " + error);
    }
);


window.plugins.applicationPreferences.set('name_identifier','homer', function() {
        alert("It is saved");
    }, function(error) {
        alert("Failed to retrieve a setting: " + error);
    }
);

I'm still having issues with this plugin.

I have tried a few things but it doesn't seem to work.

I get the following error,

TypeError: 'undefined' is not a function (evaluating 'cordova.exec(success,fail,"applicationPreferences","getSetting",[args])')

Note: I am using cordova version 2.5.

Please help!