Skip to content

Commit 3456739

Browse files
Readme.md file updated
1 parent 3ec7dca commit 3456739

File tree

2 files changed

+37
-38
lines changed

2 files changed

+37
-38
lines changed

README.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Mirrorfly UIKit Sdk is a set of prebuilt UI components that allows you to easily
66

77
The requirements for chat SDK for React-Native App are:
88

9-
- React Version 16.0 or above
10-
- Node Version v14.17.4 or above
9+
- React Version 18.3.1 or above
10+
- Node Version v18.20.8 or above
1111

1212
### Things to be Noted Before Making a Start
1313

@@ -25,49 +25,49 @@ Follow the below steps to get your license key:
2525

2626
**Step 4:** You can copy the license key from the ‘Application info’ section
2727

28-
### Integrate the Chat SDK
28+
**Step 4:** To run this sample app use first install the dependacy `npm i --legacy-peer-deps`
2929

30-
> Install mirrorfly-uikit-react-native (https://www.npmjs.com/package/mirrorfly-uikit-react-native) npm package by terminal command 'npm i mirrorfly-uikit-react-native'. Now the node_modules will have a mirrorfly-uikit-react-native folder and package.json is added with the mirrorfly-uikit-react-native dependency.
31-
32-
**Step 1:** Create a new React project or Open an existing project.
33-
34-
**Step 2:** Open terminal and install mirrorfly-uikit-react-native with npm command 'npm i mirrorfly-uikit-react-native' and check package.json whether the dependency is added with mirrorfly-uikit-react-native as mentioned below.
30+
**Step 5:** In this file `/src/config/config.js`, please update the API_URL and licenseKey
3531

3632
```jsx
37-
"dependencies": {
38-
"mirrorfly-uikit-react-native": "^1.0.6",
39-
"react": "^16.0.0",
40-
}
33+
GOOGLE_LOCATION_API_KEY: '*******************', // NOSONAR
34+
API_URL: 'https://console.mirrorfly.com/', // NOSONAR ADDED mirrorfly console URL to avoid crash in Android
35+
licenseKey: '*****************', // NOSONAR
36+
4137
```
4238

43-
>**Note :** Please refer the doc for more info about installation (https://www.mirrorfly.com/docs/uikit/reactnative/quick-start/)
4439

45-
**Step 3:** Import ChatApp component from the mirrorfly-uikit-react-native package in node modules.
40+
**Step 6:** Then run the application using the command `npm start -- --reset-cache`
41+
42+
**Step 7:** To integrate the sample app `src` folder with your existing application please follow the upcoming steps
43+
44+
> **Note :** Please refer the doc for more info about installation (https://www.mirrorfly.com/docs/uikit/reactnative/quick-start/)
45+
46+
**Step 8:** In root indes.js file please intialize the mirrorfly SDK using as follows,
47+
48+
```js
49+
import config from './src/config/config';
50+
import { mirrorflyInitialize, setupCallScreen } from './src/uikitMethods';
51+
52+
53+
mirrorflyInitialize({
54+
apiBaseUrl: config.API_URL,
55+
licenseKey: config.licenseKey,
56+
isSandbox: false, // Based on your license key if you trail user please update this with true
57+
});
58+
59+
setupCallScreen();
60+
61+
```
4662

4763
```jsx
48-
import { ChatApp, mirrorflyInitialize} from 'mirrorfly-uikit-react-native';
49-
function App() {
64+
import React from 'react';
65+
import { Platform } from 'react-native';
66+
import { MirrorflyComponent } from './src';
5067

51-
const API_URL = '****************';
52-
const LICENSE_KEY = '************';
53-
54-
React.useEffect(() => {
55-
(async () => {
56-
await mirrorflyInitialize({
57-
apiBaseUrl: API_URL,
58-
licenseKey: LICENSE_KEY,
59-
isSandbox: true,
60-
callBack: res => {
61-
console.log(res);
62-
},
63-
});
64-
})();
65-
}, []);
66-
67-
return (
68-
<>
69-
<ChatApp />
70-
</>
71-
);
68+
function App() {
69+
return <MirrorflyComponent />;
7270
}
71+
7372
export default App;
73+
```

index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ setAppConfig({ appSchema: MIRRORFLY_RN });
1313
mirrorflyInitialize({
1414
apiBaseUrl: config.API_URL,
1515
licenseKey: config.licenseKey,
16-
callbackListeners: () => {},
1716
isSandbox: false,
1817
});
1918

0 commit comments

Comments
 (0)