Salesforce React Native messaging library for in-app chat functionality
npm install react-native-messaging-in-appimport { launchChat } from 'react-native-messaging-in-app';
// Launch chat with configuration
const config = {
serviceAPI: 'https://your-service-api.com',
organizationId: 'your-org-id',
developerName: 'your-developer-name',
userVerificationRequired: false,
language: 'en',
chatMedium: 'mobile',
brand: 'your-brand',
country: 'US'
};
try {
await launchChat(config);
} catch (error) {
console.error('Failed to launch chat:', error);
}The launchChat function accepts a configuration object with the following properties:
serviceAPI(string, required): The URL of your service APIorganizationId(string, required): Your organization IDdeveloperName(string, required): Your developer nameuserVerificationRequired(boolean, optional): Whether user verification is required (default: false)language(string, optional): Language code for the chat interfacechatMedium(string, optional): Medium identifier for the chatbrand(string, optional): Brand identifiercountry(string, optional): Country code
This library requires the following iOS dependencies:
- SMIClientUI
- SMIClientCore
Make sure these are properly configured in your iOS project.
Add Maven Repository
Add the following maven repository to your build.gradle or build.gradle.kts file.
Add maven repo to build.gradle
maven { url "https://s3.amazonaws.com/inapp.salesforce.com/public/android" }
This library requires the following Android dependencies:
com.salesforce.service:messaging-inapp-ui:1.9.0
The Android dependencies are automatically included via the library's build.gradle file.
- ✅ iOS (Swift/Objective-C)
- ✅ Android (Kotlin)
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library