Install through NPM

Follow the given steps below:

  • Step 1 – Open terminal
  • Step 2 – Go to your React Native project directory
  • Step-3 – Run Command npm install enx-rtc-react-native --save
  • Step 4 – Run Command to link react-native link enx-rtc-react-native

After installation completes successfully, Import enx-rtc-react-native in your class where you want to access EnableX Capabilities.

For example:

import {Enx, EnxRoom, EnxStream, EnxPlayerView} from "enx-rtc-react-native";   

For iOS , open the Podfile (inside the iOS folder) and add use_frameworks! :linkage => :dynamic  inside you target, then run pod Install.

Error & Exceptions

React Native SDK method call might face exception cases and fail. In such cases a JSON is returned through Callback. Example of JSON Object given below:

{
	"errorCode": Number,
	"msg": "String",
	"desc": "String"
}
  • errorCode– Number. Error Code.
  • msg – String. Error Message.
  • desc – String. Optional. Descriptive explanation of the error.