CometChat React Native app (built using CometChat Pro Java Script SDK) is a text messaging app capable of one-on-one (private) and group messaging.
Simply Clone the project from cometchat-pro-react-native-sampe-app repository and open in Text Editor of choice. To run the React Native App you need to have react native setup on your system. To setup react native you can follow the Installation guide at the follwing link React Native Setup.
We have injected two components from sample app to make Java script SDK compatible with React Native the components are as follows: 1] DOMParser 2] base-64 encode and decode
This is done in LoginScreen.js file in src folder. Here base-64 can be injected globally but DomParser needs to be injected only after CometChat.init().
To Run to sample App you have to do the following changes by Adding apiKey and appID
-
Open the Project App
-
Go to Under src --> LoginScreen.js
-
modify appID and apiKey with your own ApiKey and AppId
let appID = "XXXXXXXXX" ,apiKey = "XXXXXXXXX";
You can Obtain your APP_ID and API_KEY from CometChat Pro Dashboard
For more information read CometChat Pro JavaScript SDK Documentation
Feel free to make Pull Request.