react-native-keychain: TypeError: Cannot read property 'setGenericPasswordForOptions' of undefined
I use Keychain as basic example:
Keychain
.setGenericPassword('myUserName', 'myPassword')
.then(() => {
console.log('Credentials saved successfully!');
});
but this error happens:
Do you have any idea why ?About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 17
- Comments: 17 (2 by maintainers)
Had this problem, was solved by running
read more here
this error goes away after a clean rebuild: rm -rf ios/build && react-native run-ios
The only thing that helped me is rebuilding project via Android Studio’s Build -> Rebuild project menu item.