react-native-secure-randombytes
Usage
// asynchronous API// uses iOS-side SecRandomCopyBytes asyncRandomBytes
Installation
Automatic - Android / iOS (recommended)
rnpm link
Manual
iOS
-
Drag RNRandomBytes.xcodeproj from node_modules/react-native-secure-randombytes into your XCode project.
-
Click on the project in XCode, go to Build Phases, then Link Binary With Libraries and add
libRNRandomBytes.a
Confused? See an example with screenshots here
Android
- Update Gradle Settings
// file: android/settings.gradle... include ':randombytes', ':app'project(':randombytes').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-secure-randombytes/android')
- Update Gradle Build
// file: android/app/build.gradle... dependencies { ... compile project(':randombytes')}
- Register React Package
...