oblador / react-native-keychain

:key: Keychain Access for React Native
MIT License
3.19k stars 520 forks source link

How to store my password keychain in icloud using react-native-keychain #375

Open manojkumarpri opened 4 years ago

manojkumarpri commented 4 years ago

i tried basic setup like await Keychain.setGenericPassword( this.state.username, this.state.password, { accessControl: this.state.accessControl, securityLevel: this.state.securityLevel, storage: this.state.storageSelection, } ); //the popup not raising

hieuvh3011 commented 4 years ago

Because you are using the wrong function. Try this:

const {username, password} = this.state;
Keychain.setSharedWebCredentials(webCredentials, username, password)
    .then(()=>{
        //implement logic when success here
     })
     .catch((error)=>{
        //implement logic when fail here
     });
gabimoncha commented 3 years ago

@hieuvh3011 I tried the same thing but I get the same error as you reported in issue #402

m-ruhl commented 3 years ago

This is only possible with a kSecAttrSynchronizable-flag, unfortunately this is not implemented by the plugin #156