-
Notifications
You must be signed in to change notification settings - Fork 3
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
ISS-158592: Modularize the mobile SDK documentation #221
Conversation
…ation (#218) * Update the latest default theme feature iOS documentations * Move this code snippet and description in support section from UIKit * Improve the documentation for dynamic theme configuration * Make it sentence case for consistency
There was a problem hiding this 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.
The React Native guide doesn't seem to be up-to-date as it seems to have conflicts. |
Published docs preview URL: https://devrev-preview-267a7f81-9017-4b67-9606-09620060d002.docs.buildwithfern.com |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)
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. |
Published docs preview URL: https://devrev-preview-c641255d-f4cb-48e0-b2bc-7e06572dbd85.docs.buildwithfern.com |
You can create new folders as necessary. If you change any file paths, you'll need to update them in the |
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 |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)
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. |
fern/docs/pages/sdks/web/methods.mdx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 | |
Published docs preview URL: https://devrev-preview-dcab929c-dddd-4ab3-b6f3-4b6eeca7ee37.docs.buildwithfern.com |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: |
fern/docs/pages/sdks/web/methods.mdx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) | |
Published docs preview URL: https://devrev-preview-3942530e-f598-4f2f-80fb-457f4d66e873.docs.buildwithfern.com |
@@ -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. |
There was a problem hiding this comment.
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)
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. |
There was a problem hiding this comment.
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)
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)
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); | |
There was a problem hiding this comment.
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)
|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); | |
There was a problem hiding this comment.
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)
|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). |
There was a problem hiding this comment.
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)
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)
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:)`: |
There was a problem hiding this comment.
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)
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)
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. |
There was a problem hiding this comment.
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); | |
There was a problem hiding this comment.
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); | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)
This method will generate and return the device token. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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;}` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
Published docs preview URL: https://devrev-preview-33629ea0-e96e-4ae5-9d43-dec63a0bd079.docs.buildwithfern.com |
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