kapture-chat-rn-sdk
v1.0.1
Published
React Native SDK for Kapture CRM WebView Chat
Downloads
18
Maintainers
Readme
Kapture Chat RN SDK
React Native SDK for integrating Kapture CRM WebView Chat into your mobile applications.
Installation
npm install kapture-chat-rn-sdk react-native-webviewiOS Setup
cd ios && pod installUsage
import React from "react";
import { SafeAreaView, StyleSheet } from "react-native";
import KaptureChat from "kapture-chat-rn-sdk";
const App = () => {
return (
<SafeAreaView style={styles.container}>
<KaptureChat
dataSupportKey="your-support-key"
chatfor="customer"
server="prod"
customerCode="************=="
iv="*********"
onLoad={() => console.log("Chat loaded!")}
onError={(error) => console.error("Error:", error)}
/>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
});
export default App;Props
| Prop | Type | Required | Description |
| ---------------- | -------- | -------- | ------------------------------ |
| dataSupportKey | string | Yes | Kapture support key |
| chatfor | string | No | Chat type identifier |
| server | string | No | Server environment |
| serverHost | string | No | Server host URL |
| scriptType | string | No | Script type |
| customerCode | string | No | Customer code (Base64) |
| iv | string | No | Initialization vector |
| fcmToken | string | No | Firebase Cloud Messaging token |
| customParams | object | No | Additional custom parameters |
| onLoad | function | No | Callback when WebView loads |
| onError | function | No | Callback on error |
| onMessage | function | No | Callback for WebView messages |
| style | object | No | WebView style |
| containerStyle | object | No | Container style |
Requirements
- React Native >= 0.60
- react-native-webview >= 11.0.0
License
MIT
