{"id":29082035,"url":"https://github.com/devrev/devrev-sdk-react-native","last_synced_at":"2026-01-29T10:03:32.443Z","repository":{"id":301531709,"uuid":"994776777","full_name":"devrev/devrev-sdk-react-native","owner":"devrev","description":"DevRev SDK, used for integrating DevRev services into your React Native app.","archived":false,"fork":false,"pushed_at":"2025-12-19T09:45:56.000Z","size":1006,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-16T21:15:49.109Z","etag":null,"topics":["analytics","android","chat","framework","ios","ipados","java","kotlin","library","mobile","mobile-sdk","objective-c","observability","react-native","support","swift","typescript"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devrev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-02T13:15:36.000Z","updated_at":"2025-12-19T09:45:58.000Z","dependencies_parsed_at":"2025-11-27T11:11:57.736Z","dependency_job_id":null,"html_url":"https://github.com/devrev/devrev-sdk-react-native","commit_stats":null,"previous_names":["devrev/devrev-sdk-react-native"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/devrev/devrev-sdk-react-native","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrev%2Fdevrev-sdk-react-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrev%2Fdevrev-sdk-react-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrev%2Fdevrev-sdk-react-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrev%2Fdevrev-sdk-react-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devrev","download_url":"https://codeload.github.com/devrev/devrev-sdk-react-native/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devrev%2Fdevrev-sdk-react-native/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28875446,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T09:47:23.353Z","status":"ssl_error","status_checked_at":"2026-01-29T09:47:19.357Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","android","chat","framework","ios","ipados","java","kotlin","library","mobile","mobile-sdk","objective-c","observability","react-native","support","swift","typescript"],"created_at":"2025-06-27T20:01:48.150Z","updated_at":"2026-01-29T10:03:32.436Z","avatar_url":"https://github.com/devrev.png","language":null,"readme":"# DevRev SDK for React Native and Expo\n\nDevRev SDK, used for integrating DevRev services into your React Native and Expo apps.\n\n- [DevRev SDK for React Native and Expo](#devrev-sdk-for-react-native-and-expo)\n  - [Quickstart](#quickstart)\n    - [Requirements](#requirements)\n    - [Installation](#installation)\n      - [Expo](#expo)\n    - [Set up the DevRev SDK](#set-up-the-devrev-sdk)\n  - [Features](#features)\n    - [Identification](#identification)\n      - [Identify an unverified user](#identify-an-unverified-user)\n      - [Identify a verified user](#identify-a-verified-user)\n        - [Generate an AAT](#generate-an-aat)\n        - [Exchange your AAT for a session token](#exchange-your-aat-for-a-session-token)\n        - [Identify the verified user](#identify-the-verified-user)\n      - [Update the user](#update-the-user)\n      - [Logout](#logout)\n    - [Identity model](#identity-model)\n      - [Properties](#properties)\n        - [User traits](#user-traits)\n        - [Organization traits](#organization-traits)\n        - [Account traits](#account-traits)\n    - [Support chat](#support-chat)\n      - [Create a new support conversation](#create-a-new-support-conversation)\n    - [In-app link handling](#in-app-link-handling)\n    - [In-app link callback](#in-app-link-callback)\n    - [Dynamic theme configuration](#dynamic-theme-configuration)\n    - [Analytics](#analytics)\n    - [Session analytics](#session-analytics)\n      - [Opt in or out](#opt-in-or-out)\n      - [Session recording](#session-recording)\n      - [Session properties](#session-properties)\n      - [Mask sensitive data](#mask-sensitive-data)\n      - [Mask elements inside web views](#mask-elements-inside-web-views)\n      - [User interaction tracking](#user-interaction-tracking)\n      - [Timers](#timers)\n      - [Capture errors](#capture-errors)\n      - [Track screens](#track-screens)\n      - [Manage screen transitions (Android only)](#manage-screen-transitions-android-only)\n    - [Push notifications](#push-notifications)\n      - [Configuration](#configuration)\n      - [Register for push notifications](#register-for-push-notifications)\n      - [Unregister from push notifications](#unregister-from-push-notifications)\n      - [Handle push notifications](#handle-push-notifications)\n        - [Android](#android)\n        - [iOS](#ios)\n  - [Sample app (without framework)](#sample-app-without-framework)\n  - [Sample app (Expo)](#sample-app-expo)\n  - [Troubleshooting](#troubleshooting)\n    - [ProGuard (Android only)](#proguard-android-only)\n  - [Migration Guide](#migration-guide)\n\n## Quickstart\n\n### Requirements\n\n- React Native 0.79.0 or later.\n- For Expo apps, Expo 50.0.0 or later.\n- Android: minimum API level 24.\n- iOS: minimum deployment target 15.1.\n- (Recommended) An SSH key configured locally and registered with [GitHub](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh).\n\n### Installation\n\nTo install the DevRev SDK, run the following command:\n\n```bash\nnpm install @devrev/sdk-react-native\n```\n\n#### Expo\n\n1. To install the DevRev SDK, run the following command:\n\t```bash\n\tnpx expo install @devrev/sdk-react-native-expo-plugin\n\t```\n2. Configure the Expo config plugin in your `app.json` or `app.config.js`:\n\t```json\n\t{\n\t  \"expo\": {\n\t    \"plugins\": [\n\t      \"@devrev/sdk-react-native-expo-plugin\"\n\t    ]\n\t  }\n\t}\n\t```\n3. Rebuild your app:\n\t```bash\n\tnpx expo prebuild --clean\n\t```\n\n### Set up the DevRev SDK\n\n1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page.\n2. Under **PLuG settings** copy the value under **Your unique App ID**.\n3. Configure the DevRev SDK in your app using the obtained credentials.\n\n\u003e [!WARNING]\n\u003e The DevRev SDK must be configured before you can use any of its features.\n\nThe SDK becomes ready for use once the following configuration method is executed.\n\n```typescript\nDevRev.configure(appID: string)\n```\n\n## Features\n\n### Identification\n\nTo access certain features of the DevRev SDK, user identification is required.\n\nThe identification function should be placed appropriately in your app after the user logs in. If you have the user information available at app launch, call the function after the `DevRev.configure(appID: string)` method.\n\n\u003e [!TIP]\n\u003e If you haven't previously identified the user, the DevRev SDK will automatically create an anonymous user for you immediately after the SDK is configured.\n\n\u003e [!TIP]\n\u003e The `Identity` structure allows for custom fields in the user, organization, and account traits. These fields must be configured through the DevRev app before they can be used. For more information, refer to [Object customization](https://devrev.ai/docs/product/object-customization).\n\nYou can select from the following methods to identify users within your application:\n\n#### Identify an unverified user\n\nThe unverified identification method identifies users with a unique identifier, but it does not verify their identity with the DevRev backend.\n\n```typescript\nDevRev.identifyUnverifiedUser(userID: string, organizationID?: string)\n```\n\n#### Identify a verified user\n\nThe verified identification method is used to identify users with an identifier unique to your system within the DevRev platform. The verification is done through a token exchange process between you and the DevRev backend.\n\nThe steps to identify a verified user are as follows:\n1. Generate an AAT for your system (preferably through your backend).\n2. Exchange your AAT for a session token for each user of your system.\n3. Pass the user identifier and the exchanged session token to the `DevRev.identifyVerifiedUser(userID: string, sessionToken: string)` method.\n\n\u003e [!WARNING]\n\u003e For security reasons, it is **strongly recommended** that the token exchange is executed on your backend to prevent exposing your application access token (AAT).\n\n##### Generate an AAT\n\n1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page.\n2. Open the **PLuG Tokens** page.\n3. Under the **Application access tokens** panel, click **New token** and copy the token that's displayed.\n\n\u003e [!WARNING]\n\u003e Ensure that you copy the generated application access token, as you cannot view it again.\n\n##### Exchange your AAT for a session token\n\nTo proceed with identifying the user, you need to exchange your AAT for a session token. This step helps you identify a user of your own system within the DevRev platform.\n\nHere is a simple example of an API request to the DevRev backend to exchange your AAT for a session token:\n\n\u003e [!WARNING]\n\u003e Make sure that you replace the `\u003cAAT\u003e` and `\u003cYOUR_USER_ID\u003e` with the actual values.\n\n```bash\ncurl \\\n--location 'https://api.devrev.ai/auth-tokens.create' \\\n--header 'accept: application/json, text/plain, */*' \\\n--header 'content-type: application/json' \\\n--header 'authorization: \u003cAAT\u003e' \\\n--data '{\n  \"rev_info\": {\n    \"user_ref\": \"\u003cYOUR_USER_ID\u003e\"\n  }\n}'\n```\n\nThe response of the API call contains a session token that you can use with the verified identification method in your app.\n\n\u003e [!WARNING]\n\u003e As a good practice, **your** app should retrieve the exchanged session token from **your** backend at app launch or any relevant app lifecycle event.\n\n##### Identify the verified user\n\nPass the user identifier and the exchanged session token to the verified identification method:\n\n```typescript\nDevRev.identifyVerifiedUser(userID: string, sessionToken: string)\n```\n\n#### Update the user\n\nYou can update the user's information using the following method:\n\n```typescript\nDevRev.updateUser(identity: Identity)\n```\n\n\u003e [!WARNING]\n\u003e The `userID` property cannot be updated.\n\n#### Logout\n\nYou can logout of the current user by using the following method:\n\n```typescript\nDevRev.logout(deviceID: string)\n```\n\n### Identity model\n\nThe `Identity` interface is used to provide user, organization, and account information when identifying users or updating their details. This class is used primarily with the `identifyUnverifiedUser` and `updateUser` methods.\n\n#### Properties\n\nThe `Identity` class contains the following properties:\n\n| Property | Type | Required | Description |\n|----------|------|----------|-------------|\n| `userRef` | `string` | ✅ | A unique identifier for the user |\n| `organizationRef` | `string?` | ❌ | An identifier for the user's organization |\n| `accountRef` | `string?` | ❌ | An identifier for the user's account |\n| `userTraits` | `UserTraits?` | ❌ | Additional information about the user |\n| `organizationTraits` | `OrganizationTraits?` | ❌ | Additional information about the organization |\n| `accountTraits` | `AccountTraits?` | ❌ | Additional information about the account |\n\n\u003e [!NOTE]\n\u003e The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.\n\n##### User traits\n\nThe `UserTraits` class contains detailed information about the user:\n\n\u003e [!NOTE]\n\u003e All properties in `UserTraits` are optional.\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `displayName` | `string?` | The displayed name of the user |\n| `email` | `string?` | The user's email address |\n| `fullName` | `string?` | The user's full name |\n| `description` | `string?` | A description of the user |\n| `customFields` | `{ [key: string]: any }` | Dictionary of custom fields configured in DevRev |\n\n##### Organization traits\n\nThe `OrganizationTraits` class contains detailed information about the organization:\n\n\u003e [!NOTE]\n\u003e All properties in `OrganizationTraits` are optional.\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `displayName` | `string?` | The displayed name of the organization |\n| `domain` | `string?` | The organization's domain |\n| `description` | `string?` | A description of the organization |\n| `phoneNumbers` | `string[]?` | Array of the organization's phone numbers |\n| `tier` | `string?` | The organization's tier or plan level |\n| `customFields` | `{ [key: string]: any }` | Dictionary of custom fields configured in DevRev |\n\n##### Account traits\n\nThe `AccountTraits` class contains detailed information about the account:\n\n\u003e [!NOTE]\n\u003e All properties in `AccountTraits` are optional.\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `displayName` | `string?` | The displayed name of the account |\n| `domains` | `string[]?` | Array of domains associated with the account |\n| `description` | `string?` | A description of the account |\n| `phoneNumbers` | `string[]?` | Array of the account's phone numbers |\n| `websites` | `string[]?` | Array of websites associated with the account |\n| `tier` | `string?` | The account's tier or plan level |\n| `customFields` | `{ [key: string]: any }` | Dictionary of custom fields configured in DevRev |\n\n### Support chat\n\nOnce the user identification is complete, you can start using the chat (conversations) dialog supported by our DevRev SDK. The support chat feature can be shown as a modal screen from the top-most screen.\n\n```typescript\nDevRev.showSupport()\n```\n\n#### Create a new support conversation\n\nYou can initiate a new support conversation directly from your app. This method displays the support chat screen and simultaneously creates a new conversation.\n\n```typescript\nDevRev.createSupportConversation()\n```\n\n### In-app link handling\n\nIn certain cases, the links opened from the support chat are opened in the app instead of a browser. You can control whether the chat modal should be dismissed after the link is opened by calling the following method:\n\n```typescript\nDevRev.setShouldDismissModalsOnOpenLink(value: boolean)\n```\n\nSetting this flag to true applies the system's default behavior for opening links, which includes dismissing any DevRev modal screens to facilitate handling your own deep links.\n\n### In-app link callback\n\n\u003e [!TIP]\n\u003e This feature is supported only on Android.\n\nFor scenarios where custom handling is needed, links from the support chat can be captured with the following method:\n\n```typescript\nDevRev.setInAppLinkHandler((url) =\u003e {\n\t// Perform an action here.\n});\n```\n\n### Dynamic theme configuration\n\nThe DevRev SDK allows you to configure the theme dynamically based on the system appearance, or use the theme configured on the DevRev portal. By default, the theme is dynamic and follows the system appearance.\n\n```typescript\nDevRev.setPrefersSystemTheme(value: boolean)\n```\n\n### Analytics\n\nThe DevRev SDK allows you to send custom analytic events by using a properties map. You can track these events using the following function:\n\n```typescript\nDevRev.trackEvent(name: string, properties?: { [key: string]: string })\n```\n\n### Session analytics\n\nThe DevRev SDK offers session analytics features to help you understand how users interact with your app.\n\n#### Opt in or out\n\nSession analytics features are opted-in by default, enabling them from the start. However, you can opt-out using the following method:\n\n```typescript\nDevRev.stopAllMonitoring()\n```\n\nTo opt back in, use the following method:\n\n```typescript\nDevRev.resumeAllMonitoring()\n```\n\n#### Session recording\n\nYou can enable session recording to record user interactions with your app.\n\n\u003e [!NOTE]\n\u003e The session recording feature is opt-out and is enabled by default.\n\nThe session recording feature includes the following methods to control the recording:\n\n| Method                                                               | Action                                                    |\n|--------------------------------------------------------------------|-----------------------------------------------------------|\n|`DevRev.startRecording()`   | Starts the session recording.                             |\n|`DevRev.stopRecording()`    | Stops the session recording and uploads it to the portal. |\n|`DevRev.pauseRecording()`   | Pauses the ongoing session recording.                     |\n|`DevRev.resumeRecording()`  | Resumes a paused session recording.                       |\n|`DevRev.processAllOnDemandSessions()`  | Stops the ongoing user recording and sends all on-demand sessions along with the current recording. |\n\n#### Session properties\n\nYou can add custom properties to the session recording to help you understand the context of the session. The properties are defined as a map of string values.\n\n```typescript\nDevRev.addSessionProperties(properties: { [key: string]: string })\n```\n\nTo clear the session properties in scenarios such as user logout or when the session ends, use the following method:\n\n```typescript\nDevRev.clearSessionProperties()\n```\n\n#### Mask sensitive data\n\nTo protect sensitive data, the DevRev SDK provides an auto-masking feature that masks data before sending to the server. Input views such as password text fields are automatically masked.\n\nWhile the auto-masking feature is sufficient for most situations, you can manually mark additional views as sensitive using the following method:\n\n```typescript\nDevRev.markSensitiveViews(tags: any[])\n```\n\nIf any previously masked views need to be unmasked, you can use the following method:\n\n```typescript\nDevRev.unmarkSensitiveViews(tags: any[])\n```\n\nFor example:\n\n```typescript\nimport * as DevRev from '@devrev/sdk-react-native';\nimport { View, Text, findNodeHandle } from \"react-native\";\nimport { useRef, useEffect } from \"react\";\n\nconst YourComponent = () =\u003e {\n  const sensitiveViewRef = useRef(null);\n  const insensitiveViewRef = useRef(null);\n\n  useEffect(() =\u003e {\n    // Mark sensitive view\n    const sensitiveId = findNodeHandle(sensitiveViewRef.current);\n    if (sensitiveId) {\n      DevRev.markSensitiveViews([sensitiveId]);\n    }\n\n    // Unmark insensitive view\n    const insensitiveId = findNodeHandle(insensitiveViewRef.current);\n    if (insensitiveId) {\n      DevRev.unmarkSensitiveViews([insensitiveId]);\n    }\n  }, []);\n\n  return (\n    \u003cView\u003e\n      \u003cView ref={sensitiveViewRef}\u003e\n        \u003cText\u003eSensitive content (masked in recordings)\u003c/Text\u003e\n      \u003c/View\u003e\n      \u003cView ref={insensitiveViewRef}\u003e\n        \u003cText\u003eInsensitive content (visible in recordings)\u003c/Text\u003e\n      \u003c/View\u003e\n    \u003c/View\u003e\n  );\n};\n\nexport default YourComponent;\n```\n\n#### Mask elements inside web views\n\nTo mark elements as sensitive inside a web view (`WebView`), apply the `devrev-mask` CSS class. To unmark them, use `devrev-unmask`.\n\n- Mark an element as masked:\n  ```html\n  \u003clabel class=\"devrev-mask\"\u003eOTP: 12345\u003c/label\u003e\n  ```\n- Mark an element as unmasked:\n  ```html\n  \u003cinput type=\"text\" placeholder=\"Enter Username\" name=\"username\" required class=\"devrev-unmask\"\u003e\n  ```\n\n#### User interaction tracking\n\nThe DevRev SDK automatically tracks user interactions such as taps, swipes, and scrolls. However, in some cases you may want to disable this tracking to prevent sensitive user actions from being recorded.\n\nTo **temporarily disable** user interaction tracking, use the following method:\n\n```typescript\nDevRev.pauseUserInteractionTracking()\n```\n\nTo **resume** user interaction tracking, use the following method:\n\n```typescript\nDevRev.resumeUserInteractionTracking()\n```\n\n#### Timers\n\nThe DevRev SDK offers a timer mechanism to measure the time spent on specific tasks, allowing you to track events such as response time, loading time, or any other duration-based metrics.\n\nThe mechanism uses balanced start and stop methods, both of which accept a timer name and an optional dictionary of properties.\n\nTo start a timer, use the following method:\n\n```typescript\nDevRev.startTimer(name: string, properties: { [key: string]: string })\n```\n\nTo stop a timer, use the following method:\n\n```typescript\nDevRev.endTimer(name: string, properties: { [key: string]: string })\n```\n\n#### Capture errors\n\nYou can report a handled error from a catch block using the `captureError` function.\n\nThis ensures that even if the error is handled in your app, it will still be logged for diagnostics.\n\n```typescript\nDevRev.captureError(\n    error: Error | string,\n    tag: string\n)\n```\n\n**Example:**\n\n```typescript\ntry {\n} catch (error) {\n    DevRev.captureError(\n        error,\n        'network-failure'\n    );\n}\n```\n\n**Example with Error:**\n\n```typescript\ntry {\n    throw new Error('Something went wrong');\n} catch (error) {\n    DevRev.captureError(error, 'custom-error');\n}\n```\n\n#### Track screens\n\nThe DevRev SDK offers automatic screen tracking to help you understand how users navigate through your app. Although screens are automatically tracked, you can manually track screens using the following method:\n\n```typescript\nDevRev.trackScreenName(name: string)\n```\n\n#### Manage screen transitions (Android only)\n\nThe DevRev SDK allows tracking of screen transitions to understand the user navigation within your app.\nYou can manually update the state using the following methods:\n\n```javascript\n// Mark the transition as started.\nDevRev.setInScreenTransitioning(true)\n\n// Mark the transition as ended.\nDevRev.setInScreenTransitioning(false)\n```\n\n### Push notifications\n\nYou can configure your app to receive push notifications from the DevRev SDK. The SDK is able to handle push notifications and execute actions based on the notification's content.\n\nThe DevRev backend sends push notifications to your app to notify users about new messages in the support chat.\n\n#### Configuration\n\nTo receive push notifications, you need to configure your DevRev organization by following the instructions in the [push notifications](https://developer.devrev.ai/sdks/mobile/push-notifications) section.\n\n#### Register for push notifications\n\n\u003e [!TIP]\n\u003e Push notifications require that the SDK has been configured and the user has been identified, to ensure delivery to the correct user.\n\nThe DevRev SDK offers a method to register your device for receiving push notifications. You can register for push notifications using the following method:\n\n```typescript\nDevRev.registerDeviceToken(deviceToken: string, deviceID: string)\n```\n\nOn Android devices, the `deviceToken` should be the Firebase Cloud Messaging (FCM) token value, while on iOS devices, it should be the Apple Push Notification service (APNs) token.\n\n#### Unregister from push notifications\n\nIf your app no longer needs to receive push notifications, you can unregister the device.\n\nUse the following method to unregister the device:\n\n```typescript\nDevRev.unregisterDevice(deviceID: string)\n```\n\nThe method requires the device identifier, which should be the same as the one used when registering the device.\n\n#### Handle push notifications\n\n##### Android\n\nOn Android, notifications are implemented as data messages to offer flexibility. However, this means that automatic click processing isn't available. To handle notification clicks, developers need to intercept the click event, extract the payload, and pass it to a designated method for processing. This custom approach enables tailored notification handling in Android applications.\n\nTo process the notification, use the following method:\n\n```typescript\nDevRev.processPushNotification(payload: string)\n```\n\nHere, the `message` object from the notification payload needs to be passed to this function.\n\nFor example:\n\n```typescript\nconst notificationPayload = {\n\t// message may be nested based on the notification library\n\t\"message\": {\n\t\t// ... (the entire message object)\n\t}\n};\nconst messageJson = notificationPayload[\"message\"];\nDevRev.processPushNotification(JSON.stringify(messageJson));\n```\n\n##### iOS\n\nOn iOS devices, you must pass the received push notification payload to the DevRev SDK for processing. The SDK handles the notification and executes the necessary actions.\n\n```typescript\nDevRev.processPushNotification(payload: string)\n```\n\nFor example:\n```typescript\nDevRev.processPushNotification(JSON.stringify(payload));\n```\n\n## Sample app (without framework)\n\nA sample app with use cases for the DevRev SDK for React Native has been provided as a part of our [public repository](https://github.com/devrev/devrev-sdk-react-native). To set up and run the sample app, follow these steps:\n\n1. Go to the sample directory:\n    ```bash\n    cd sample/react-native\n    ```\n2. Install the dependencies:\n    ```bash\n    yarn install\n    ```\n3. For iOS, run:\n    ```bash\n    pod install --project-directory=ios --repo-update\n    ```\n4. Start the React Native development server:\n    ```bash\n    npx react-native start\n    ```\n5. Run the app on Android using:\n    ```bash\n    npx react-native run-android\n    ```\n    or open the `android` directory in Android Studio and run the app from there.\n6. Run the app on iOS using:\n    ```bash\n    npx react-native run-ios\n    ```\n    or open `ios/DevRevSDKSampleRN.xcworkspace` in Xcode and run the app from there.\n\n## Sample app (Expo)\n\nA sample app with use cases for the DevRev SDK for Expo has been provided as a part of our [public repository](https://github.com/devrev/devrev-sdk-react-native). To set up and run the sample app, follow these steps:\n\n1. Go to the sample directory:\n\t```bash\n\tcd sample/expo\n\t```\n2. Install the dependencies:\n\t```bash\n\tyarn install\n\t```\n3. Run clean and prebuild:\n\t```bash\n\tnpx expo prebuild --clean\n\t```\n4. Run the app on Android using:\n\t```bash\n\tnpx expo run:android\n\t```\n\tOR open the `android` directory in Android Studio and run the app.\n5. Run the app on iOS:\n\t```bash\n\tnpx expo run:ios\n\t```\n\tOR open `ios/DevRevSDKSample.xcworkspace` in Xcode and run the app.\n\n## Troubleshooting\n\n- **Issue**: Support chat doesn't show.\n  **Solution**: Ensure you have correctly called one of the identification methods: `DevRev.identifyUnverifiedUser(...)` or `DevRev.identifyVerifiedUser(...)`.\n\n- **Issue**: Not receiving push notifications.\n  **Solution**: Ensure that your app is configured to receive push notifications and that your device is registered with the DevRev SDK.\n\n### ProGuard (Android only)\n\nWhen trying to build your app for Android with ProGuard enabled, refer to these common issues and their solutions.\n\n\u003e [!NOTE]\n\u003e You can always refer to the [Android ProGuard documentation](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization#proguard) for more information.\n\n- **Issue**: Missing class `com.google.android.play.core.splitcompat.SplitCompatApplication`.\n  **Solution**: Add the following line to your `proguard-rules.pro` file:\n  ```proguard\n  -dontwarn com.google.android.play.core.**\n  ```\n\n- **Issue**: Missing class issue due to transitive Flutter dependencies.\n  **Solution**: Add the following lines to your `proguard-rules.pro` file:\n  ```proguard\n  -keep class io.flutter.** { *; }\n  -keep class io.flutter.plugins.** { *; }\n  -keep class GeneratedPluginRegistrant { *; }\n  ```\n\n- **Issue**: Missing class `org.s1f4j.impl.StaticLoggerBinder`.\n  **Solution**: Add the following line to your `proguard-rules.pro` file:\n  ```proguard\n  -dontwarn org.slf4j.impl.StaticLoggerBinder\n  ```\n\n## Migration Guide\n\nIf you are migrating from the legacy UserExperior SDK to the new DevRev SDK, please refer to the [Migration Guide](./MIGRATION.md) for detailed instructions and feature equivalence.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevrev%2Fdevrev-sdk-react-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevrev%2Fdevrev-sdk-react-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevrev%2Fdevrev-sdk-react-native/lists"}