Skip to content

divyegd/react-native-messaging-in-app

 
 

Repository files navigation

react-native-messaging-in-app

Salesforce React Native messaging library for in-app chat functionality

Installation

npm install react-native-messaging-in-app

Usage

import { 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);
}

Configuration Options

The launchChat function accepts a configuration object with the following properties:

  • serviceAPI (string, required): The URL of your service API
  • organizationId (string, required): Your organization ID
  • developerName (string, required): Your developer name
  • userVerificationRequired (boolean, optional): Whether user verification is required (default: false)
  • language (string, optional): Language code for the chat interface
  • chatMedium (string, optional): Medium identifier for the chat
  • brand (string, optional): Brand identifier
  • country (string, optional): Country code

Dependencies

iOS Dependencies

This library requires the following iOS dependencies:

  • SMIClientUI
  • SMIClientCore

Make sure these are properly configured in your iOS project.

Android Dependencies

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.

Platform Support

  • ✅ iOS (Swift/Objective-C)
  • ✅ Android (Kotlin)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Swift 28.8%
  • Kotlin 28.7%
  • TypeScript 17.1%
  • JavaScript 12.1%
  • Ruby 10.8%
  • Objective-C 2.5%