react-native-keychain
Advanced tools
Comparing version 0.2.7 to 0.3.0
{ | ||
"name": "react-native-keychain", | ||
"version": "0.2.7", | ||
"version": "0.3.0", | ||
"description": "Keychain Access for React Native", | ||
"main": "index.ios.js", | ||
"main": "index", | ||
"scripts": { | ||
@@ -16,2 +16,3 @@ "test": "flow" | ||
"ios", | ||
"android", | ||
"keychain" | ||
@@ -18,0 +19,0 @@ ], |
@@ -78,6 +78,61 @@ # react-native-keychain | ||
### Android | ||
* Note: Android support requires React Native 0.19 or later | ||
* on Android, the `*InternetCredentials` calls will be resolved as calls to `*GenericPassword()` and the data will be saved in `SharedPreferences` | ||
* Edit `android/settings.gradle` to look like this (without the +): | ||
```diff | ||
rootProject.name = 'MyApp' | ||
include ':app' | ||
+ include ':react-native-keychain' | ||
+ project(':react-native-keychain').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-keychain/android') | ||
``` | ||
* Edit `android/app/build.gradle` (note: **app** folder) to look like this: | ||
```diff | ||
apply plugin: 'com.android.application' | ||
android { | ||
... | ||
} | ||
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
compile 'com.android.support:appcompat-v7:23.0.1' | ||
compile 'com.facebook.react:react-native:0.19.+' | ||
+ compile project(':react-native-keychain') | ||
} | ||
``` | ||
* Edit your `MainActivity.java` (deep in `android/app/src/main/java/...`) to look like this (note **two** places to edit): | ||
```diff | ||
package com.myapp; | ||
+ import com.oblador.keychain.KeychainPackage; | ||
.... | ||
public class MainActivity extends extends ReactActivity { | ||
@Override | ||
protected List<ReactPackage> getPackages() { | ||
return Arrays.<ReactPackage>asList( | ||
new MainReactPackage(), | ||
+ new KeychainPackage() | ||
); | ||
} | ||
... | ||
} | ||
``` | ||
## Todo | ||
- [x] iOS support | ||
- [ ] Android support | ||
- [x] Android support | ||
- [ ] Storing objects as JSON | ||
@@ -84,0 +139,0 @@ - [ ] Expose wider selection of underlying native APIs |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
166437
24
153
142