Contact Miri at support@miri.ai to register for a Client ID.
Follow these steps to install and configure the SDK into your existing React Native application.
To install the Miri React Native SDK, run the following command in your terminal:
// Yarn
yarn add @miri-ai/miri-react-native
// NPM
npm install @miri-ai/miri-react-native
Miri React Native SDK requires installing some peer dependencies to provide users with a robust experience.
The following highlights the dependencies required and purpose they serve.
@react-native-community/blur for blurred backgrounds for modals@react-native-community/datetimepicker for editing dates and times@react-native-picker/picker for picker inputslottie-react for loading animations on weblottie-react-native for loading animationsreactreact-nativeexpo-blur for blurred backgrounds for modalsexpo-camera for using the device cameraexpo-device for accessing device informationexpo-image-picker for accessing the device galleryreact-native-device-info for accessing device informationreact-native-image-picker for accessing the device galleryreact-native-linear-gradient for rendering linear gradientsreact-native-picker-select for using native pickers for editingreact-native-segmented-picker for using segmented pickers for editingreact-native-svg for rendering SVG iconsreact-native-vision-camera for accessing the device cameraSome dependencies require adding permissions to the `Info.plist` file in iOS and `AndroidManifest.xml` file in Android. Please follow the instructions for each of the dependencies listed above.
<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) would like access to your photo gallery to share image in a message.</string>
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) would like to use your camera to share image in a message.</string>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) would like to use your microphone for voice recording.</string>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />