Skip to content

ISS-158592: Modularize the mobile SDK documentation #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 63 commits into from
May 20, 2025

Conversation

dhananjayj-dev
Copy link
Contributor

@dhananjayj-dev dhananjayj-dev commented May 8, 2025

This PR unifies the naming convention for Mobile SDKs across all platforms to enhance clarity and consistency. Additionally, the documentation is restructured into modular subpages for better navigation and maintainability. The changes are applied to the Fern documentation while the existing READMEs and codebase.

Issues Link:
/close ISS-158592
/close ISS-160283
/close ISS-138840

@dhananjayj-dev dhananjayj-dev requested a review from bojan May 8, 2025 13:15
@dhananjayj-dev dhananjayj-dev self-assigned this May 8, 2025
@dhananjayj-dev dhananjayj-dev requested a review from a team as a code owner May 8, 2025 13:15
@dhananjayj-dev dhananjayj-dev added the documentation Improvements or additions to documentation label May 8, 2025
Copy link
Contributor

@bojan bojan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This look amazing and very promising.

The PR title is too big, let's try to shorten it, e.g. Modularize the mobile SDK documentation.

Also, do we actually need to have the files under the plug-sdk folder? Can we use mobile-sdk?

@rohan-devrev let's decide whether we need to have separate React Native and Expo guides. I'd name the guide DevRev SDK for React Native and Expo.

@bojan
Copy link
Contributor

bojan commented May 8, 2025

The React Native guide doesn't seem to be up-to-date as it seems to have conflicts.

@dhananjayj-dev dhananjayj-dev changed the title ISS-158592: Unify Mobile SDK Naming and Modularize Documentation Structure ISS-158592: Modularize the mobile SDK documentation May 8, 2025
Copy link
Contributor

2. Under **PLuG settings** copy the value under **Your unique App ID**.
3. After obtaining the credentials, you can configure the DevRev SDK in your app.

The SDK will be ready for use once you execute the following configuration method.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Suggested change
The SDK will be ready for use once you execute the following configuration method.
The SDK is ready for use once you execute the following configuration method.

Copy link
Contributor

@bc-devrev
Copy link
Contributor

Also, do we actually need to have the files under the plug-sdk folder? Can we use mobile-sdk?

You can create new folders as necessary. If you change any file paths, you'll need to update them in the versions/public.yml file. If you change any URLs, be sure to add redirects in the docs.yml file.

@dhananjayj-dev
Copy link
Contributor Author

The name for the web SDK was inconsistent so I fixed it to be "PLuG SDK for Web" everywhere.

I'm going to go ahead and approve but there are a few superficial problems that need to be fixed either in this PR or a separate one.

I have addressed all the other comments except for the migration guide. Can we keep it as is since it fits best in a table format and can also be viewed in full screen?

cc @bojan

@bc-devrev
Copy link
Contributor

I have addressed all the other comments except for the migration guide. Can we keep it as is since it fits best in a table format and can also be viewed in full screen?

I'll leave it up to you what to do about the migration guides. The PR is approved so you can merge when you're ready.

DevRev.logout(deviceID:)
```

The user will be logged out by clearing their credentials, as well as unregistering the device from receiving push notifications, and stopping the session recording.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Suggested change
The user will be logged out by clearing their credentials, as well as unregistering the device from receiving push notifications, and stopping the session recording.
The user is logged out by clearing their credentials, as well as unregistering the device from receiving push notifications, and stopping the session recording.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

|`widget_alignment` |The PLuG widget can be positioned on either the left or right side of the launcher. You can also adjust the widget alignment through the PLuG settings at app.devrev.ai. If alignment settings are configured in both places, the value from app.devrev.ai will override the launcher setting. |left or right |

Copy link
Contributor

If a custom handler is not defined, all external and in-app links from the support chat will open using the system's default browser, such as Chrome.
## Dynamic theme configuration

The 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 will be dynamic and follow the system appearance.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Suggested change
The 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 will be dynamic and follow the system appearance.
The 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.

@@ -279,22 +261,34 @@ const notificationPayload = {
}
};
const messageJson = notificationPayload["message"];
DevRev.processPushNotification(JSON.stringify(messageJson));
DevRevSDK.processPushNotification(JSON.stringify(messageJson));
```
#### iOS

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Suggested change
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.
On iOS devices, you must pass the received push notification payload to the DevRev SDK for processing. The SDK then handles the notification and executes the necessary actions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Consider using 'go' instead of 'navigate'. (EK25033)

The DevRev SDK offers automatic screen tracking to help you understand how users navigate through your app. Although view controllers are automatically tracked, you can manually track screens using the following method:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Suggestions:

    Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

|`custom_launcher_selector` |A CSS selector string is used to match the element to which the widget will be attached. You can also set this selector from the PLuG settings on app.devrev.ai. If both sources are set, this value will be considered the definitive source. |Boolean (True or False) |

Copy link
Contributor

@@ -329,10 +321,27 @@ This method terminates and deletes the current session recording and also disabl
</Tab>
</Tabs>

You can check whether session monitoring has been enabled by using this property:

If session recording was disabled for the user using the `stopAllMonitoring()` method, you can enable recording at runtime with this method.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [EkLine]

Don't use language (such as 'disabled ') that defines people by their disability. (EK00030)

Suggested change
If session recording was disabled for the user using the `stopAllMonitoring()` method, you can enable recording at runtime with this method.
If session recording was turned off for the user using the `stopAllMonitoring()` method, you can enable recording at runtime with this method.

</Tab>
</Tabs>

If the user was disabled for session recording by using the stopAllMonitoring() method, you can use this method to enable recording at runtime.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [EkLine]

Don't use language (such as 'disabled ') that defines people by their disability. (EK00030)

Suggested change
If the user was disabled for session recording by using the stopAllMonitoring() method, you can use this method to enable recording at runtime.
If the session recording was stopped by using the stopAllMonitoring() method, you can use this method to enable recording at runtime.

<Callout intent="note">
This feature only stores a monitoring permission flag and does not provide any user interface or dialog.
This feature will only store a monitoring permission flag, it will **not** provide any UI or dialog.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Suggested change
This feature will only store a monitoring permission flag, it will **not** provide any UI or dialog.
This feature only stores a monitoring permission flag, it **not** provide any UI or dialog.

@@ -352,9 +361,39 @@ Here are the available methods to help you control the session recording feature
|Pauses the ongoing session recording. |pauseRecording() |pauseRecording(DevRev.INSTANCE); |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [EkLine]

Keep one space between words and punctuation in 'v.I'. (EK00025)

Suggested change
|Pauses the ongoing session recording. |pauseRecording() |pauseRecording(DevRev.INSTANCE); |
|Pauses the ongoing session recording. |pauseRecording() |pauseRecording(DevRev. INSTANCE); |

@@ -352,9 +361,39 @@ Here are the available methods to help you control the session recording feature
|Pauses the ongoing session recording. |pauseRecording() |pauseRecording(DevRev.INSTANCE); |
|Resumes a paused session recording. |resumeRecording() |resumeRecording(DevRev.INSTANCE); |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [EkLine]

Keep one space between words and punctuation in 'v.I'. (EK00025)

Suggested change
|Resumes a paused session recording. |resumeRecording() |resumeRecording(DevRev.INSTANCE); |
|Resumes a paused session recording. |resumeRecording() |resumeRecording(DevRev. INSTANCE); |


## Sample app

We provide a sample app demonstrating use cases with both XML-based UI and Jetpack Compose as part our [public repository](https://github.com/devrev/devrev-sdk-android).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [EkLine]

Avoid using 'we' as it can come off as patronizing. For example, write 'The configuration is complete' rather than 'We are now done with the configuration.' (EK81039)

Suggested change
We provide a sample app demonstrating use cases with both XML-based UI and Jetpack Compose as part our [public repository](https://github.com/devrev/devrev-sdk-android).
A sample app demonstrating use cases with both XML-based UI and Jetpack Compose is part of our [public repository](https://github.com/devrev/devrev-sdk-android).


#### iOS

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Suggested change
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.
On iOS devices, you must pass the received push notification payload to the DevRev SDK for processing. The SDK then handles the notification and executes the necessary actions.

@@ -392,12 +380,16 @@ Task {

### Handle push notifications

To properly handle push notifications, implement the following method, typically in either the `UNUserNotificationCenterDelegate.userNotificationCenter(_:didReceive:)` or `UIApplicationDelegate.application(_:didReceiveRemoteNotification:fetchCompletionHandler:)`:
Push notifications coming to the DevRev SDK need to be handled manually. To properly handle them, implement the following method, typically in either the `UNUserNotificationCenterDelegate.userNotificationCenter(_:didReceive:)` or `UIApplicationDelegate.application(_:didReceiveRemoteNotification:fetchCompletionHandler:)`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [EkLine]

Remove 'properly ' if it's not important to the meaning of the statement. (EK00006)

Suggested change
Push notifications coming to the DevRev SDK need to be handled manually. To properly handle them, implement the following method, typically in either the `UNUserNotificationCenterDelegate.userNotificationCenter(_:didReceive:)` or `UIApplicationDelegate.application(_:didReceiveRemoteNotification:fetchCompletionHandler:)`:
Push notifications coming to the DevRev SDK need to be handled manually. To handle them, implement the following method, typically in either the `UNUserNotificationCenterDelegate.userNotificationCenter(_:didReceive:)` or `UIApplicationDelegate.application(_:didReceiveRemoteNotification:fetchCompletionHandler:)`

We recommend integrating the DevRev SDK using SPM.
</Callout>

## Swift Package Manager
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [EkLine]

'Swift Package Manager' should use sentence-style capitalization. (EK00037)

## Sample app
A sample app with use cases for both UIKit and SwiftUI has been provided as part of our [public repository](https://github.com/devrev/devrev-sdk-ios).

Before you start using the sample app you will need to configure it to be used with your Apple Developer team and your DevRev credentials. For your convenience the code has been marked with compiler error directives (`#error`) at the places that need attention.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Suggested change
Before you start using the sample app you will need to configure it to be used with your Apple Developer team and your DevRev credentials. For your convenience the code has been marked with compiler error directives (`#error`) at the places that need attention.
Before you start using the sample app you need to configure it to be used with your Apple Developer team and your DevRev credentials. For your convenience the code is marked with compiler error directives (`#error`) at the places that need attention.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [EkLine]

Keep one space between words and punctuation in 'v.I'. (EK00025)

|Starts the session recording. |startRecording() |startRecording(DevRev.INSTANCE, context); |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [EkLine]

Keep one space between words and punctuation in 'v.I'. (EK00025)

|Ends the session recording and uploads it to the portal. |stopRecording() |stopRecording(DevRev.INSTANCE); |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

This method will generate and return the device token.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

|`spacing` |Padding from the launcher: This padding can also be set in the PLuG settings on app.devrev.ai. If a value is specified in both places, this value will be considered the definitive source. Bottom: Padding from the bottom of the launcher. Side: Spacing from the sides of the launcher |object `{bottom: string; side: string;}` |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Suggestions:

    Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

Once the `shutdown()` method is called, all other widget functionalities, such as session recording and Nudges, will also be stopped. You will need to reinitialize the widget to reactivate these features.

Copy link
Contributor

@dhananjayj-dev dhananjayj-dev merged commit 65a7534 into main May 20, 2025
5 checks passed
@dhananjayj-dev dhananjayj-dev deleted the feature/ISS-158592-unify-moble-sdk-guide branch May 20, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants