From 2691096daaa3cbd3151c33c68f63ac359f43c6ff Mon Sep 17 00:00:00 2001 From: courier-docs-bot Date: Mon, 23 Mar 2026 19:11:15 +0000 Subject: [PATCH] docs: sync README from mintlify-docs (2026-03-23 19:10 UTC) --- README.md | 173 ++++++++++++++---------------------------------------- 1 file changed, 43 insertions(+), 130 deletions(-) diff --git a/README.md b/README.md index 4185535..e8df387 100644 --- a/README.md +++ b/README.md @@ -1,147 +1,60 @@ banner-react-native +# Courier React Native SDK -  +The Courier React Native SDK provides prebuilt components and TypeScript APIs for adding in-app notifications, push notifications, and notification preferences to your React Native app. It handles authentication, token management, and real-time message delivery across iOS and Android from a single codebase. -# Requirements & Support +## Installation - - - - - - - - - - - - - - - - - - - - - -
Requirements
Courier Account - - Sign Up - -
Minimum iOS SDK Version - 15.0 -
Minimum Android SDK Version - 23 -
- -  - -# Installation - -## Using `npm` - -```sh +```bash npm install @trycourier/courier-react-native ``` -## Using `yarn` - -```sh -yarn add @trycourier/courier-react-native -``` - -  - -## iOS - -### 1. Support iOS 15.0+ in your Project - -Screenshot 2025-01-21 at 12 55 34 PM - -### 2. Support iOS 15+ in your Podfile - -```sh -# Resolve react_native_pods.rb with node to allow for hoisting -require Pod::Executable.execute_command('node', ['-p'.. - -# Courier React Native requires iOS 15+ -platform :ios, '15.0' // Add this line -prepare_react_native_project! - -.. -``` - -### 3. Install the Cocoapods - -From the root of your React Native project run - -```sh -cd ios && pod install +Also available via `yarn add @trycourier/courier-react-native`. + +Requires iOS 15.0+, Android SDK 23+, and Gradle 8.4+. Run `cd ios && pod install` after installing. + +## Quick Start + +```jsx +import Courier, { + CourierInboxView, + CourierPreferencesView, +} from "@trycourier/courier-react-native"; + +// Sign in the user (JWT generated by your backend) +await Courier.shared.signIn({ + userId: "user_123", + accessToken: jwt, +}); + +// Add a prebuilt Inbox component + { + message.read + ? Courier.shared.unreadMessage({ messageId: message.messageId }) + : Courier.shared.readMessage({ messageId: message.messageId }); + }} + style={{ flex: 1 }} +/> + +// Add a prebuilt Preferences component + ``` -  - -## Android - -### 1. Add the Jitpack repository - -In your `android/build.gradle` make sure your build and repository values are as follows - -```gradle -buildscript { - - ext { +For Expo projects, see the [Expo setup guide](https://github.com/trycourier/courier-react-native/blob/master/Docs/6_Expo.md). - // Double check these values - buildToolsVersion = "33.0.0" - minSdkVersion = 23 - compileSdkVersion = 33 - targetSdkVersion = 33 - .. - } +## Documentation - repositories { - google() - mavenCentral() - maven { url 'https://www.jitpack.io' } // THIS LINE - } - - .. - -} -``` - -### 2. Run Gradle Sync - -Your app must support at least gradle `8.4` - -  - -### 3. Extend your `MainActivity` with `CourierReactNativeActivity` - -This allows the Courier SDK to manage the current user between app sessions. - -Java -```java -import com.courierreactnative.CourierReactNativeActivity; - -public class MainActivity extends CourierReactNativeActivity { - .. -} -``` - -Kotlin -```kotlin -import com.courierreactnative.CourierReactNativeActivity; - -class MainActivity : CourierReactNativeActivity() { - .. -} -``` +Full documentation: **[courier.com/docs/sdk-libraries/react-native](https://www.courier.com/docs/sdk-libraries/react-native/)** +- [Inbox Overview](https://www.courier.com/docs/platform/inbox/inbox-overview/) +- [Authentication](https://www.courier.com/docs/platform/inbox/authentication/) +- [Push Integrations](https://www.courier.com/docs/external-integrations/push/intro-to-push/)