diff --git a/src/content/docs/developer-tools/sdks/native/expo-react-native.mdx b/src/content/docs/developer-tools/sdks/native/expo-react-native.mdx index 70b2aae9..b923f93d 100644 --- a/src/content/docs/developer-tools/sdks/native/expo-react-native.mdx +++ b/src/content/docs/developer-tools/sdks/native/expo-react-native.mdx @@ -73,6 +73,9 @@ Follow [the installation instructions for your chosen OS](https://reactnative.d include ':react-native-inappbrowser-reborn' project(':react-native-inappbrowser-reborn').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-inappbrowser-reborn/android') + + include ':react-native-get-random-values' + project(':react-native-get-random-values').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-get-random-values/android') ... ``` @@ -91,6 +94,7 @@ Follow [the installation instructions for your chosen OS](https://reactnative.d implementation project(':react-native-keychain') implementation project(':react-native-inappbrowser-reborn') + implementation project(':react-native-get-random-values') ... } @@ -103,6 +107,7 @@ Follow [the installation instructions for your chosen OS](https://reactnative.d ... import com.oblador.keychain.KeychainPackage; import com.proyecto26.inappbrowser.RNInAppBrowserPackage; + import org.linusu.RNGetRandomValuesPackage; ... public class MainApplication extends Application implements ReactApplication { @@ -115,6 +120,7 @@ Follow [the installation instructions for your chosen OS](https://reactnative.d List packages = new PackageList(this).getPackages(); packages.add(new KeychainPackage()); packages.add(new RNInAppBrowserPackage()); + packages.add(new RNGetRandomValuesPackage()); ... return packages; } @@ -132,6 +138,7 @@ Follow [the installation instructions for your chosen OS](https://reactnative.d ```kotlin import com.oblador.keychain.KeychainPackage; import com.proyecto26.inappbrowser.RNInAppBrowserPackage; + import org.linusu.RNGetRandomValuesPackage; ... class MainApplication : Application(), ReactApplication { @@ -143,6 +150,7 @@ Follow [the installation instructions for your chosen OS](https://reactnative.d // add(MyReactNativePackage()) add(KeychainPackage()); add(RNInAppBrowserPackage()); + add(RNGetRandomValuesPackage()); } ... @@ -178,6 +186,7 @@ Follow [the installation instructions for your chosen OS](https://reactnative.d ```swift pod 'RNKeychain', :path => '../node_modules/react-native-keychain' pod 'RNInAppBrowser', :path => '../node_modules/react-native-inappbrowser-reborn' + pod 'react-native-get-random-values', :path => '../node_modules/react-native-get-random-values' ``` diff --git a/src/content/docs/developer-tools/sdks/native/react-native-sdk.mdx b/src/content/docs/developer-tools/sdks/native/react-native-sdk.mdx index 40d63b97..f28af0e4 100644 --- a/src/content/docs/developer-tools/sdks/native/react-native-sdk.mdx +++ b/src/content/docs/developer-tools/sdks/native/react-native-sdk.mdx @@ -62,7 +62,7 @@ Fundamentally, both SDK versions have equivalent functionality, so there should ### **Android** -The SDK requires the `react-native-keychain` and `react-native-inappbrowser-reborn` packages. Sometimes, they may not be automatically linked correctly, resulting in errors when running your app, such as `"Cannot read properties of undefined (reading 'isAvailable')"`. In such cases, you will need to manually link them: +The SDK requires the `react-native-keychain`, `react-native-inappbrowser-reborn` and `react-native-get-random-values` packages. Sometimes, they may not be automatically linked correctly, resulting in errors when running your app, such as `"Cannot read properties of undefined (reading 'isAvailable')"`. In such cases, you will need to manually link them: 1. Edit `android/settings.gradle` @@ -72,6 +72,9 @@ The SDK requires the `react-native-keychain` and `react-native-inappbrowser-rebo include ':react-native-inappbrowser-reborn' project(':react-native-inappbrowser-reborn').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-inappbrowser-reborn/android') + + include ':react-native-get-random-values' + project(':react-native-get-random-values').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-get-random-values/android') ``` 2. Edit `android/app/build.gradle` @@ -88,6 +91,7 @@ The SDK requires the `react-native-keychain` and `react-native-inappbrowser-rebo implementation project(':react-native-keychain') implementation project(':react-native-inappbrowser-reborn') + implementation project(':react-native-get-random-values') ... } @@ -98,6 +102,7 @@ The SDK requires the `react-native-keychain` and `react-native-inappbrowser-rebo ```java import com.oblador.keychain.KeychainPackage; import com.proyecto26.inappbrowser.RNInAppBrowserPackage; + import org.linusu.RNGetRandomValuesPackage; ... public class MainApplication extends Application implements ReactApplication { @@ -110,6 +115,7 @@ The SDK requires the `react-native-keychain` and `react-native-inappbrowser-rebo List packages = new PackageList(this).getPackages(); packages.add(new KeychainPackage()); packages.add(new RNInAppBrowserPackage()); + packages.add(new RNGetRandomValuesPackage()); ... return packages; } @@ -125,6 +131,7 @@ In React Native version 0.73 or above, the `MainApplication.java` file has been ```kotlin import com.oblador.keychain.KeychainPackage; import com.proyecto26.inappbrowser.RNInAppBrowserPackage; +import org.linusu.RNGetRandomValuesPackage; ... class MainApplication : Application(), ReactApplication { @@ -136,6 +143,7 @@ class MainApplication : Application(), ReactApplication { // add(MyReactNativePackage()) add(KeychainPackage()); add(RNInAppBrowserPackage()); + add(RNGetRandomValuesPackage()); } ... @@ -155,7 +163,7 @@ brew install cocoapods cd ios && pod install ``` -The SDK requires the `react-native-keychain` and `react-native-inappbrowser-reborn` packages. Sometimes, they may not be automatically linked correctly, resulting in errors when running your app, such as `"Cannot read properties of undefined (reading 'isAvailable')"`. In such cases, you will need to manually link them: +The SDK requires the `react-native-keychain`, `react-native-inappbrowser-reborn` and `react-native-get-random-values` packages. Sometimes, they may not be automatically linked correctly, resulting in errors when running your app, such as `"Cannot read properties of undefined (reading 'isAvailable')"`. In such cases, you will need to manually link them: 1. **Option: With CocoaPods (Highly recommended)** @@ -164,13 +172,14 @@ The SDK requires the `react-native-keychain` and `react-native-inappbrowser-rebo ```swift pod 'RNKeychain', :path => '../node_modules/react-native-keychain' pod 'RNInAppBrowser', :path => '../node_modules/react-native-inappbrowser-reborn' + pod 'react-native-get-random-values', :path => '../node_modules/react-native-get-random-values' ``` 2. **Option: Manually link the packages with Xcode** - Go to the **Build Phases** tab and choose **Link Binary With Libraries.** - Select **+** - - Add **Other** > **Add Files** > **node_modules/react-native-keychain/RNKeychain.xcodeproj** (similar with **RNInAppBrowser**) - - Add **libRNKeychain.a** (similar with **RNInAppBrowser**) + - Add **Other** > **Add Files** > **node_modules/react-native-keychain/RNKeychain.xcodeproj** (similar with **RNInAppBrowser** and **react-native-get-random-values**) + - Add **libRNKeychain.a** (similar with **RNInAppBrowser** and **react-native-get-random-values**) - Clean and rebuild. If you encounter any errors during the SDK installation process, you can refer to the General Tips section at the end of this topic.