Comments (19)
I'm getting this error on "react-native": "0.40.0","react-native-keychain": "^1.1.0"
and fixes with import * as Keychain from 'react-native-keychain';
instead of import Keychain from 'react-native-keychain';
from react-native-keychain.
Thanks @vonovak, your comment helped me to get it working with android. In addition to the rnpm link
, I had to add to MainApplication.java
:
...
import com.oblador.keychain.KeychainPackage; // <-- added
....
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new KeychainPackage() // <-- added
That fixed it for Android. Still need to sort out iOS though. FYI @oblador
from react-native-keychain.
Thanks for the response @akullpp
I did this before but what i was doing wrong is the import.
Import Keychain from 'react-native-keychain' instead of
Import * as Keychain .....
from react-native-keychain.
@Moumene see step 2: https://facebook.github.io/react-native/docs/linking-libraries-ios.html
from react-native-keychain.
I had the same issue, but a simple re-run of react-native run-ios
fixed it for me. Hope this helps someone else who comes across this error.
from react-native-keychain.
@digitaldavenyc same here... I tried restarting, cleaning rebuilding and what not, but keep getting this error. did you manage so resolve it?
RN: 0.31, react-native-keychain: 3.2, iOS simulator
Update - I compiled the app for Android and run it on a device, and got the same error.
from react-native-keychain.
I run react-native init test
, npm install react-native-keychain
and rnpm link
.
Then I copied the example code from the readme and run - and got the same error.. so it looks like something is broken when working with RN 0.31.
from react-native-keychain.
@Kufert I'm running it successfully on RN 0.31 on although I linked it with one of the previous versions. Have you tried it with npm install --save react-native-keychain
?
from react-native-keychain.
@Kufert have you tried following the manual installation steps?
from react-native-keychain.
@Kufert same for me on iOS, can you get this working?
from react-native-keychain.
I'm getting this same error anytime I try to login on Android.
RN: 0.35
Keychain: 0.32
Genymotion Simulator
None of the above fixes have solved the problem for me. Can anyone verify that they've gotten it to work on Android with RN 0.35?
from react-native-keychain.
I'm having the same problem (iOS)
I followed the Readme instructions. Tried with react-native link
, with rnpm link
, using the Podfile
and adding manually.
Still, I keep on getting the same error
{ [TypeError: undefined is not an object (evaluating 'RNKeychainManager.setGenericPasswordForService')]
line: 73951,
column: 18,
sourceURL: 'http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false' }
Any help?
from react-native-keychain.
I face the same problem and successfully solved by changing to version 0.3.2.
from react-native-keychain.
Any further information? Didn't work for me to change the downgrade the version. Using RN 0.40.0.
from react-native-keychain.
Please make sure the native module is linked correctly and that you're importing the js module correctly. If you use RN >= 0.40 you need to use the newest release.
from react-native-keychain.
Thanks, it works now with the latest version on RN >= 0.40 my issue was that the binary wasn't linked.
from react-native-keychain.
how did you mange to link the binary @akullpp ? i'm in the same error with keychain on ios simulator
thanks buddy
from react-native-keychain.
I feel dumb ... readme is correct and the example works,
don't bother with different imports and such.
package.json
if you're wondering how similar it is to yours:
"dependencies": {
"react": "16.0.0-alpha.6",
"react-native": "0.44.0",
"react-native-i18n": "^1.0.0",
"react-native-keychain": "^1.2.0",
"react-native-vector-icons": "^4.1.1",
"react-navigation": "^1.0.0-beta.11"
},
I simply forgot to run react-native run-android
thus not compiling the android side of things...
from react-native-keychain.
I had the same issue. I resolved it by running pod install
on my iOS folder. Voilà, it's working now.
from react-native-keychain.
Related Issues (20)
- Encrypt and decrypt failing on latest Samsung OS HOT 11
- Warning when using SetGenericPassword with service HOT 2
- No podspec found for `RNKeychain`
- Fingerprint Bypass using Frida and Objection techniques HOT 1
- Using it together with native iOS project HOT 2
- Android crash from adding react-native-keychain package HOT 1
- Unrecognized platform name visionOS error HOT 8
- iOS & android keychain items are not erased when the app is uninstalled HOT 1
- Pods install failed with Invalid `RNKeychain.podspec` file: undefined method `visionos' for #<Pod::Specification name="RNKeychain" HOT 5
- App crash on launch - Only happens on Huawei devices
- Replace `SharedPreferences` with `DataStore` Preferences on Android HOT 2
- Cold start on android took 5-10 seconds longer than before the library update HOT 11
- Example project not building iOS HOT 3
- [RN-Android]: Not able to retrieve credentials from App B after storing credentials from App A. HOT 1
- Android build failed after upgrading to java 21
- Issue building app 8.1.2, 8.1.2 and 8.2.0 HOT 1
- Understanding the key store access life cycle.
- [Enhancement] Support for Passkey
- UI animation freezing when calling any `set` functions in Android HOT 1
- Does React Native Keychain use iOS Keychain and Android Keystore under the hood? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-keychain.