Skip to content

Commit 5cc525e

Browse files
Update the React Native SDK guide to unify the public entry point (#222)
1 parent 8cbb395 commit 5cc525e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

fern/docs/pages/plug-sdk/react-native.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ npm install @devrev/sdk-react-native
1010

1111
## Set up the DevRev SDK
1212

13-
In DevRev, go to **Settings** > **PLuG Chat** copy the value under **Your unique App ID**. After obtaining the credentials, you can configure the DevRev SDK in your app.
13+
In DevRev, go to **Settings** > **PLuG Chat** copy the value under **Your unique App ID**. After obtaining the credentials, you can configure the DevRev SDK in your app.
1414

1515
<Callout intent="note">
1616
The DevRev SDK must be configured before you can use any of its features.
@@ -107,7 +107,7 @@ This feature is for Android only.
107107
For scenarios where custom handling is needed, links from the support chat can be captured with the following method:
108108

109109
```typescript
110-
DevRevSDK.setInAppLinkHandler((url) => {
110+
DevRev.setInAppLinkHandler((url) => {
111111
// Perform an action here.
112112
});
113113
```
@@ -170,7 +170,7 @@ You can add custom properties to the session recording to help you understand th
170170
DevRev.addSessionProperties(properties: Map<string, string>)
171171
```
172172

173-
To clear the session properties in scenarios such as user logout or when the session ends, use the following method:
173+
To clear the session properties in scenarios such as user logout or when the session ends, use the following method:
174174

175175
```typescript
176176
DevRev.clearSessionProperties()
@@ -237,19 +237,19 @@ To ensure delivery to the correct user, push notifications require that the SDK
237237
The DevRev SDK offers a method to register your device for receiving push notifications. You can register for push notifications using the following method:
238238

239239
```typescript
240-
DevRevSDK.registerDeviceToken(deviceToken: string, deviceID: string)
240+
DevRev.registerDeviceToken(deviceToken: string, deviceID: string)
241241
```
242242

243243
On Android devices, the `deviceToken` must be the Firebase Cloud Messaging (FCM) token value. On iOS devices, it must be the Apple Push Notification Service (APNs) token.
244244

245245
### Unregister from push notifications
246246

247-
If your app no longer needs to receive push notifications, you can unregister the device.
247+
If your app no longer needs to receive push notifications, you can unregister the device.
248248

249249
Use the following method to unregister the device:
250250

251251
```typescript
252-
DevRevSDK.unregisterDevice(deviceID: string)
252+
DevRev.unregisterDevice(deviceID: string)
253253
```
254254

255255
The method requires the device identifier, which should be the same as the one used when registering the device.
@@ -264,7 +264,7 @@ On Android, notifications are implemented as data messages to offer flexibility.
264264
To process the notification, use the following method:
265265

266266
```typescript
267-
DevRevSDK.processPushNotification(payload: string)
267+
DevRev.processPushNotification(payload: string)
268268
```
269269

270270
Here, the `message` object from the notification payload should be passed to this function.
@@ -279,20 +279,20 @@ const notificationPayload = {
279279
}
280280
};
281281
const messageJson = notificationPayload["message"];
282-
DevRevSDK.processPushNotification(JSON.stringify(messageJson));
282+
DevRev.processPushNotification(JSON.stringify(messageJson));
283283
```
284284
#### iOS
285285

286-
On iOS devices, you must pass the received push notification payload to the DevRev SDK for processing. The SDK will then handle the notification and execute the necessary actions.
286+
On iOS devices, you must pass the received push notification payload to the DevRev SDK for processing. The SDK will then handle the notification and execute the necessary actions.
287287

288288
```typescript
289-
DevRevSDK.processPushNotification(payload: string)
289+
DevRev.processPushNotification(payload: string)
290290
```
291291

292292
For example:
293293

294294
```typescript
295-
DevRevSDK.processPushNotification(JSON.stringify(payload));
295+
DevRev.processPushNotification(JSON.stringify(payload));
296296
```
297297

298298
## License

0 commit comments

Comments
 (0)