-
Notifications
You must be signed in to change notification settings - Fork 0
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
Mobile-sdk.mdx #108
base: main
Are you sure you want to change the base?
Mobile-sdk.mdx #108
Conversation
ISS-124016
Published docs preview URL: https://devrev-preview-4efa3878-8a12-431f-ab2f-e397a0bc7a1a.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-7b380d2c-c1d8-471d-9a4b-5e3ac38e9826.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-36402793-5a5c-4629-a964-1fdf93d5c1d1.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-34dc815e-94c1-4106-ac87-2f37a16ac10c.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-e5246786-947f-48a3-a793-f63d95d4b04e.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-125c5335-e2cc-4e51-ab85-91e21eaa37d8.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-10e0e011-e2f4-412e-8f3a-7a37f2bda127.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-1d8d2204-d4ac-414b-93d2-45de30b60410.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-6a503e16-edb8-4e43-97da-baa0169c1e41.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-7ff7fb76-55fd-4350-a5f2-62b133ecfd56.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-8817e305-8e2d-4159-9a22-60cbebc1f5ab.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-d78abb71-6b53-4653-ac56-869a29d21234.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-5c4f8f45-7d74-41bd-8f54-8d5c0ab41a00.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-c9f0f7db-9266-4513-b8b0-f5a4027e47e5.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-40aebb10-2cc0-4b8f-bc14-4ffaad7c80f0.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-4b9ef6db-8ac3-4621-a378-8784e3f63d0a.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-231f2b59-29ba-4f5a-a6de-07a97bb265ff.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-1130ac47-967c-42c1-a76c-b195d5ab914f.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-4dbbdf2e-b01a-45f2-baab-bfd10de5c31e.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-d015cb02-ed83-4547-8c5a-03b29bc95cb6.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-fc06d414-d24c-4fd2-81c4-906717b1d4cf.docs.buildwithfern.com |
Published docs preview URL: https://devrev-preview-b08a0412-3a3a-4998-bfd7-e8e5fe3a807d.docs.buildwithfern.com |
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.
Some minor changes, but generally iOS looks pretty good!
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.
I'd name this file ios-sample-xcode-configuration.png
for clarity.
The DevRev SDK can be integrated using either Swift Package Manager (SPM) or CocoaPods. | ||
|
||
<Callout intent="note"> | ||
We recommend integrating the DevRev SDK using Swift Package Manager. | ||
</Callout> | ||
|
||
### Swift Package Manager (Recommended) | ||
|
||
To integrate the DevRev SDK into your project using Swift Package Manager (SPM): |
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.
Since the abbreviation for Swift Package Manager is a term of art and is well known within the community, we can refer to it using SPM after the first mention. I'll make sure to update the iOS readme as well.
The DevRev SDK can be integrated using either Swift Package Manager (SPM) or CocoaPods. | |
<Callout intent="note"> | |
We recommend integrating the DevRev SDK using Swift Package Manager. | |
</Callout> | |
### Swift Package Manager (Recommended) | |
To integrate the DevRev SDK into your project using Swift Package Manager (SPM): | |
The DevRev SDK can be integrated using either Swift Package Manager (SPM) or CocoaPods. | |
<Callout intent="note"> | |
We recommend integrating the DevRev SDK using Swift Package Manager. | |
</Callout> | |
### Swift Package Manager | |
To integrate the DevRev SDK into your project using SPM: |
1. Open your project in Xcode and navigate to the **Add Package Dependency**. | ||
2. Enter the DevRev SDK URL under **Enter Package URL**: | ||
- For HTTPS: https://github.com/devrev/devrev-sdk-ios | ||
- For SSH: [email protected]:devrev/devrev-sdk-ios.git **RECONFIRM THIS** |
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.
- For SSH: [email protected]:devrev/devrev-sdk-ios.git **RECONFIRM THIS** | |
- For SSH: `[email protected]:devrev/devrev-sdk-ios.git` |
```ruby | ||
|
||
pod 'DevRevSDK', '~> 1.0.0' | ||
|
||
``` |
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.
Since this is a codeblock, adding a GH suggestion here won't work, so let's just remove the blank lines:
pod 'DevRevSDK', '~> 1.0.0'
1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page. | ||
2. Under **PLuG settings** obtain **Your unique App ID** (referred to as `supportID` in the code). | ||
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.
This section has breaking changes, let's try to follow the original as close as possible.
Feel free to adapt the wording a bit.
1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page. | |
2. Under **PLuG settings** obtain **Your unique App ID** (referred to as `supportID` in the code). | |
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. | |
1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page. | |
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. | |
<Callout intent="critical"> | |
The DevRev SDK must be configured before you can use any of its features. | |
</Callout> |
await DevRev.trackEvent(name: "open-message-screen", properties: ["id": "foo-bar-1337"]) | ||
``` | ||
|
||
## Session analytics |
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 is a good pointer, we'll change the mentions of Observability with Session analytics in the SDKs as well.
|
||
### Screen tracking | ||
|
||
The DevRev SDK offers automatic screen tracking to help you understand how users navigate through your app. Although activities are automatically tracked, you can manually track screens using the following 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.
We need to tweak this a bit since iOS doesn't have activities:
The DevRev SDK offers automatic screen tracking to help you understand how users navigate through your app. Although activities are automatically tracked, you can manually track screens using the following method: | |
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: |
|
||
### Configuration | ||
|
||
To receive push notifications, you need to configure your DevRev organization by following the Push Notifications Integration guide (**TBD ITEM**). |
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.
We need Ribhu's input here for the TBD ITEM.
|
||
To receive push notifications, you need to configure your DevRev organization by following the Push Notifications Integration guide (**TBD ITEM**). | ||
|
||
You need to ensure that your iOS app is configured to receive push notifications. You can follow the [Apple documentation](https://developer.apple.com/documentation/usernotifications/registering_your_app_with_apns) for guidance on registering your app with Apple Push Notification Service (APNS). |
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.
Apple naming, don't ask 🤣
You need to ensure that your iOS app is configured to receive push notifications. You can follow the [Apple documentation](https://developer.apple.com/documentation/usernotifications/registering_your_app_with_apns) for guidance on registering your app with Apple Push Notification Service (APNS). | |
You need to ensure that your iOS app is configured to receive push notifications. You can follow the [Apple documentation](https://developer.apple.com/documentation/usernotifications/registering_your_app_with_apns) for guidance on registering your app with Apple Push Notification Service (APNs). |
DevRev.registerDeviceToken(_:deviceID:) | ||
``` | ||
|
||
The method requires a device identifier, which can either be an identifier unique to your system or the Apple-provided Vendor Identifier (IDFV). Typically, registration is called from the `AppDelegate.application(_:didRegisterForRemoteNotificationsWithDeviceToken:)` 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.
The method requires a device identifier, which can either be an identifier unique to your system or the Apple-provided Vendor Identifier (IDFV). Typically, registration is called from the `AppDelegate.application(_:didRegisterForRemoteNotificationsWithDeviceToken:)` method. | |
The method requires a device identifier, which can either be an identifier unique to your system or the Apple-provided Vendor Identifier (IDFV). Typically, the token registration is called from the `AppDelegate.application(_:didRegisterForRemoteNotificationsWithDeviceToken:)` 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.
- Indent code samples and sub-lists under list items.
- Consolidate tab groups; don't follow a tab group for different languages with another tab group for the same languages.
- Minimize the use of tables since Turing can't interpret them.
- Address comments from EkLine; in particular never use "foo".
@@ -80,6 +80,9 @@ navigation: | |||
- page: Integrate PLuG with your iOS app | |||
slug: install-ios | |||
path: ../docs/pages/plug-sdk/install-ios.mdx | |||
- page: Integrate PLuG SDKs with your Android app | |||
slug: 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.
Should have some convention for the slugs and paths. Like just the platform (ios
, android
, web
) if that's sufficient, or the platform plus a keyword for the goal (install
, integrate
, etc.).
|
||
```xml | ||
<application | ||
android:name=".FooApplication"> |
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.
Never use "foo". https://www.notion.so/devrev/What-words-or-phrases-should-be-avoided-and-why-c424af306b2f42c3b2db511e8e7dd459?pvs=4
android:name=".FooApplication"> | |
android:name=".ExampleApplication"> |
<Tab title="Kotlin"> | ||
```kotlin | ||
// Identify an anonymous user without a user identifier. | ||
DevRev.identifyAnonymousUser("abcd1234") |
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.
Are these "examples" really necessary? They don't seem to add much over the reference.
|
||
1. Add the following dependencies to your app's `build.gradle.kts` file to get the latest version of our SDK: | ||
|
||
```kotlin |
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.
Throughout, indent code samples under the numbered item.
```kotlin | |
```kotlin |
If you don’t have a custom `Application` class, create one as shown below. | ||
</Callout> | ||
|
||
<Tabs> |
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.
Over all there are about twice as many tab groups as necessary. Combine the code samples into the same tab as the relevant language.
|
||
Here are the available methods to help you control the session recording feature: | ||
|
||
| Kotlin | Java | Action | |
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 table renders poorly because the Java context is so long. Is it really necessary to repeat it in every row? Maybe put it in the header. Action should be the first column.
| Kotlin | Java | Action | | |
| Action | Kotlin (`DevRev`) | Java (`DevRevObservabilityExtKt`) | |
Before using the sample app, configure it with your Apple Developer team and DevRev credentials. For convenience, the code is marked with compiler error directives (`#error`) in areas that require your attention. | ||
|
||
1. Add your credentials: | ||
- For SwiftUI, add your credentials to `ContentView.swift`. |
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.
Indent
- For SwiftUI, add your credentials to `ContentView.swift`. | |
- For SwiftUI, add your credentials to `ContentView.swift`. |
ISS-124016