Skip to content
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

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open

Mobile-sdk.mdx #108

wants to merge 34 commits into from

Conversation

@Atul-Butola Atul-Butola requested a review from a team as a code owner November 4, 2024 06:53
@Atul-Butola Atul-Butola changed the title **WIP**-Create sdk-android.mdx **WIP** Mobile-sdk.mdx Nov 4, 2024
Copy link

github-actions bot commented Nov 4, 2024

Copy link

github-actions bot commented Nov 4, 2024

Copy link

github-actions bot commented Nov 4, 2024

Copy link

github-actions bot commented Nov 4, 2024

Copy link

github-actions bot commented Nov 4, 2024

@Atul-Butola Atul-Butola marked this pull request as draft November 6, 2024 06:55
Copy link

github-actions bot commented Nov 6, 2024

Copy link

github-actions bot commented Nov 6, 2024

Copy link

github-actions bot commented Nov 6, 2024

Copy link

github-actions bot commented Nov 6, 2024

Copy link

github-actions bot commented Nov 6, 2024

Copy link

github-actions bot commented Nov 6, 2024

Copy link

github-actions bot commented Nov 6, 2024

Copy link

github-actions bot commented Nov 6, 2024

Copy link

github-actions bot commented Nov 7, 2024

Copy link

github-actions bot commented Nov 7, 2024

Copy link

github-actions bot commented Nov 7, 2024

Copy link

github-actions bot commented Nov 7, 2024

Copy link

github-actions bot commented Nov 7, 2024

Copy link

github-actions bot commented Nov 7, 2024

@Atul-Butola Atul-Butola changed the title **WIP** Mobile-sdk.mdx Mobile-sdk.mdx Nov 7, 2024
@Atul-Butola Atul-Butola marked this pull request as ready for review November 7, 2024 11:28
Copy link

github-actions bot commented Nov 7, 2024

Copy link

github-actions bot commented Nov 7, 2024

Copy link

github-actions bot commented Nov 7, 2024

Copy link

@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.

Some minor changes, but generally iOS looks pretty good!

Copy link

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.

Comment on lines +11 to +19
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):
Copy link

@bojan bojan Nov 7, 2024

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.

Suggested change
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**
Copy link

Choose a reason for hiding this comment

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

Suggested change
- For SSH: [email protected]:devrev/devrev-sdk-ios.git **RECONFIRM THIS**
- For SSH: `[email protected]:devrev/devrev-sdk-ios.git`

Comment on lines +35 to +39
```ruby

pod 'DevRevSDK', '~> 1.0.0'

```
Copy link

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'

Comment on lines +46 to +48
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.
Copy link

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.

Suggested change
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
Copy link

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.

cc @rohan-devrev


### 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:
Copy link

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:

Suggested change
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**).
Copy link

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

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 🤣

Suggested change
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.
Copy link

Choose a reason for hiding this comment

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

Suggested change
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.

@bc-devrev bc-devrev added the EkLine Run EkLine automated QA label Nov 7, 2024
Copy link
Collaborator

@bc-devrev bc-devrev left a 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
Copy link
Collaborator

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">
Copy link
Collaborator

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

Suggested change
android:name=".FooApplication">
android:name=".ExampleApplication">

<Tab title="Kotlin">
```kotlin
// Identify an anonymous user without a user identifier.
DevRev.identifyAnonymousUser("abcd1234")
Copy link
Collaborator

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
Copy link
Collaborator

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.

Suggested change
```kotlin
```kotlin

If you don’t have a custom `Application` class, create one as shown below.
</Callout>

<Tabs>
Copy link
Collaborator

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 |
Copy link
Collaborator

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.

Suggested change
| 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`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Indent

Suggested change
- For SwiftUI, add your credentials to `ContentView.swift`.
- For SwiftUI, add your credentials to `ContentView.swift`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EkLine Run EkLine automated QA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants