Install the React Native SDK
Learn how to install the Agentforce Mobile SDK for React Native in your project.
Before installing, ensure you meet the system requirements.
Install the React Native Agentforce bridge using npm or yarn:
The package includes TypeScript types out of the box. All public exports are available from 'react-native-agentforce'.
Configure your iOS project to use the Agentforce SDK.
In your ios/Podfile, add the bridge pod. The bridge depends on React-Core and AgentforceSDK (the native iOS SDK distributed via CocoaPods).
Service Agent only (default):
Service Agent + Employee Agent (with Mobile SDK auth):
If you also need Employee Agent support with OAuth authentication via the Salesforce Mobile SDK, use the WithMobileSDK subspec:
The WithMobileSDK subspec adds a dependency on SalesforceSDKCore, which provides OAuth login flows. See Employee Agent Authentication for details.
The bridge is written in Swift 5.0+. If your app is Objective-C only, Xcode prompts you to create a bridging header on first build.
If you enable voice features (enableVoice: true), add the microphone usage description to your Info.plist:
If you enable camera/photo features (enableMultiModalInput: true), add:
Configure your Android project to use the Agentforce SDK.
Add the Agentforce Maven repositories and configure your app's android/app/build.gradle:
The bridge library module includes agentforce-sdk as an api dependency. Your host app must provide SalesforceReact at runtime if you use Employee Agent auth.
In your MainApplication.kt (or .java), register AgentforcePackage:
AgentforcePackage automatically registers AgentforceModule. It also registers EmployeeAgentAuthBridge if the Salesforce Mobile SDK is detected on the runtime classpath (via reflection). If the Mobile SDK is not present, Employee Agent auth is gracefully disabled.
Register the conversation activity in your AndroidManifest.xml:
For camera/multi-modal input support, add to AndroidManifest.xml:
After installation, verify the native module is available:
If you see errors about the native module not being found, see Troubleshooting.