Crypho / cordova-plugin-secure-storage

Secure storage plugin for Apache Cordova
MIT License
278 stars 269 forks source link

SecureStorage.set() not working for iOS 11.1 simulator #136

Closed sagrawal31 closed 7 years ago

sagrawal31 commented 7 years ago

Using Ionic 3 and installed the latest version of this plugin and when invoking the set method on iOS 11.1 emulator and getting the error:

Error: Failure in SecureStorage.set() - One or more parameters passed to a function were not valid

I opened the simulator dev console and directly tried as given int the docs:

Create a namespaced storage

var ss = new cordova.plugins.SecureStorage(
    function () { console.log('Success')},
    function (error) { console.log('Error ' + error); },
    'my_app');

and then

Set a key/value in the storage

ss.set(
    function (key) { console.log('Set ' + key); },
    function (error) { console.log('Error ' + error); },
    'mykey', 'myvalue');

and getting the same error.

ggozad commented 7 years ago

Duplicate of #134