Installation Guide
Install the sdk using npm:
npm install rtc-react-native-sdk
Add all the sdk dependencies to "dependencies" section of application package.json
"dependencies": {
"react-native": "0.63.2",
"@react-native-community/async-storage": "latest",
"@react-native-community/netinfo": ">=5.9.7",
"base-64": "latest",
"events": ">=3.2.0",
"axios": ">=0.20.0",
"google-libphonenumber": "3.2.13",
"prop-types": "latest",
"react": "16.13.1",
"react-native-background-timer": "2.4.0",
"react-native-device-info": "latest",
"react-native-flash-message": "latest",
"react-native-incall-manager": "3.3.0",
"react-native-vector-icons": "7.1.0",
"react-native-webrtc": "https://github.com/555platform/react-native-webrtc.git",
"react-native-sound": "0.11.0",
"react-native-webview": "11.23.1",
"react-navigation": ">=4.3.9",
"utf8": "latest",
"rtc-react-native-sdk": "1.3.3"
},
Run the following command in terminal to install all the "dependencies" present in your package.json file
npm install
iOS
Using terminal, navigate to project’s iOS folder by using the following command.
cd ios
To use pods and update them to latest version use the following commands. This command will ask your system password, Skip the first command if you already used pods in local.
sudo gem install cocoapods
pod repo update
Run the following command to install all the required pods for the project.
pod install
After successful installation of pods open the project in Xcode by clicking "yourprojectname.xcworkspace" file in iOS folder then Run the project manually from Xcode in debug mode or use the following command to run from terminal.
react-native run-ios
Info That Will help when Running on iOS
Refer to this points If You face Any issues while installing the "rtc-react-native-sdk" or when you running the project.
- Make Sure the iOS target version in pod file is "12.0" or higher.
- Make Sure all the Package versions are latest.
- If You are Upgrading the react-native version from "0.61/0.62 to 0.63" in podfile
Replace
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
With
pod 'React-callinvoker', :path => "../node_modules/react-native/ReactCommon/callinvoker"
Android
sdk and dependenceis will be autolinked on npm install.
Inorder to use SDK, minsdkversion of application in build.gradle should be set to 24
buildscript {
ext {
minSdkVersion = 24
}
}
Refer to this point if you face any issues while installing the "rtc-react-native-sdk" or when you running the project.
- Make Sure all the required package are imported and added under the Override method in the "MainApplication.java" file.