@amityco/rcg-react-native-social-app
v1.0.0-beta01
Published
RCG React Native Social App package built on Amity UIKit
Readme
RCG React Native Social App
A React Native Social App package built on Amity UIKit, providing ready-to-use social networking features for your React Native applications.
Installation
yarn add @amityco/rcg-react-native-social-appPeer Dependencies
This package requires the following peer dependencies to be installed in your project:
yarn add @amityco/[email protected] \
@amityco/ts-sdk-react-native@^7.9.2 \
@babel/plugin-transform-export-namespace-from@^7.27.1 \
@react-native-async-storage/async-storage@^2.2.0 \
@react-native-community/datetimepicker@^8.4.4 \
@react-native-community/netinfo@^11.3.1 \
@react-navigation/native@^7.1.8 \
@react-navigation/native-stack@^7.3.12 \
@react-navigation/stack@^7.3.1 \
react-native-compressor@^1.13.0 \
react-native-fs@^2.20.0 \
[email protected] \
react-native-get-random-values@^1.11.0 \
react-native-image-picker@^8.2.1 \
react-native-linear-gradient@^2.8.3 \
react-native-netinfo@^1.1.0 \
react-native-safe-area-context@^5.6.2 \
[email protected] \
react-native-svg@^15.15.1 \
react-native-video@^6.18.0 \
react-native-video-controls@^2.8.1 \
react-native-vision-camera@^4.7.3Usage
require('@amityco/rcg-react-native-social-app/App')Props
| Prop | Type | Required | Description |
| -------------- | ------------- | -------- | ------------------------------------------------------------------------------------------------- |
| userId | string | Yes | Unique identifier for the user |
| displayName | string | No | Display name for the user |
| apiKey | string | Yes | Your Amity API key |
| apiRegion | string | No | API region (e.g., "us", "eu", "sg") |
| apiEndpoint | string | No | Custom API endpoint URL |
| authToken | string | No | Authentication token for secure mode |
| behaviour | IBehaviour | No | Behavior configuration for UIKit components |
| fcmToken | string | No | Firebase Cloud Messaging token for push notifications |
Configuration
The package uses a uikit.config.json file for UIKit configuration. You can customize the appearance and behavior of the social features by modifying this configuration.
Update babel.config.js
Add the required Babel plugin to your brownfield app's babel.config.js:
module.exports = {
plugins: [
'@babel/plugin-transform-export-namespace-from',
// ... your other plugins
],
};Permission
IOS
pod 'SPTPersistentCache', :modular_headers => true
pod 'DVAssetLoaderDelegate', :modular_headers => true
$RNVideoUseVideoCaching = trueAdd following permissions to info.plist file (ios/{YourAppName}/Info.plist)
<key>NSCameraUsageDescription</key>
<string>App needs access to the camera to take photos.</string>
<key>NSMicrophoneUsageDescription</key>
<string>App needs access to the microphone to record audio.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>App needs access to the gallery to select photos.</string>Android
Add required permissions to android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />Please refer full guide on Integration Guideline
