Skip to content

Commit 5bd5e85

Browse files
committed
Fix the iOS SDK callouts
1 parent 6ac5e9e commit 5bd5e85

File tree

2 files changed

+42
-28
lines changed

2 files changed

+42
-28
lines changed

fern/docs/pages/sdks/mobile/ios/features.mdx

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ To access certain features of the DevRev SDK, user identification is required.
66

77
The identification function should be placed appropriately in your app after the user logs in. If you have the user information available at app launch, call the function after the `DevRev.configure(appID:)` method.
88

9-
<Callout intent="note">
9+
<Callout intent="tip">
1010
If you haven't previously identified the user, the DevRev SDK will automatically create an anonymous user for you immediately after the SDK is configured.
1111
</Callout>
1212

13-
<Callout intent="note">
13+
<Callout intent="tip">
1414
The `Identity` structure allows for custom fields in the user, organization, and account traits. These fields must be configured through the DevRev app before they can be utilized. For more information, refer to [Object customization](https://devrev.ai/docs/product/object-customization).
1515
</Callout>
1616

@@ -43,25 +43,30 @@ The steps to identify a verified user are as follows:
4343
2. Exchange your AAT for a session token for each user of your system.
4444
3. Pass the user identifier and the exchanged session token to the `DevRev.identifyVerifiedUser(_:sessionToken:)` method.
4545

46-
> [!CAUTION]
47-
> For security reasons we **strongly recommend** that the token exchange is executed on your backend to prevent exposing your application access token (AAT).
46+
<Callout intent="warning">
47+
For security reasons we **strongly recommend** that the token exchange is executed on your backend to prevent exposing your application access token (AAT).
48+
</Callout>
4849

4950
#### Generate an AAT
5051

5152
1. Open the DevRev web app at [https://app.devrev.ai](https://app.devrev.ai) and go to the **Settings** page.
5253
2. Open the **PLuG Tokens** page.
5354
3. Under the **Application access tokens** panel, click **New token** and copy the token that's displayed.
5455

55-
> [!IMPORTANT]
56-
> Ensure that you copy the generated application access token, as you cannot view it again.
56+
<Callout intent="warning">
57+
Ensure that you copy the generated application access token, as you cannot view it again.
58+
</Callout>
5759

5860
#### Exchange your AAT for a session token
5961

6062
In order to proceed with identifying the user, you need to exchange your AAT for a session token. This step will help you identify a user of your own system within the DevRev platform.
6163

6264
Here is a simple example of an API request to the DevRev backend to exchange your AAT for a session token:
63-
> [!CAUTION]
64-
> Make sure that you replace the `<AAT>` and `<YOUR_USER_ID>` with the actual values.
65+
66+
<Callout intent="warning">
67+
Make sure that you replace the `<AAT>` and `<YOUR_USER_ID>` with the actual values.
68+
</Callout>
69+
6570
```bash
6671
curl \
6772
--location 'https://api.devrev.ai/auth-tokens.create' \
@@ -77,8 +82,9 @@ curl \
7782

7883
The response of the API call will contain a session token that you can use with the verified identification method in your app.
7984

80-
> [!NOTE]
81-
> As a good practice, **your** app should retrieve the exchanged session token from **your** backend at app launch or any relevant app lifecycle event.
85+
<Callout intent="warning">
86+
As a good practice, **your** app should retrieve the exchanged session token from **your** backend at app launch or any relevant app lifecycle event.
87+
</Callout>
8288

8389
#### Identifying the verified user
8490

@@ -100,11 +106,11 @@ DevRev.updateUser(_:)
100106

101107
This function accepts the `DevRev.Identity` structure.
102108

103-
<Callout intent="note">
109+
<Callout intent="warning">
104110
The `userID` property cannot be updated.
105111
</Callout>
106112

107-
<Callout intent="note">
113+
<Callout intent="tip">
108114
The identification functions are asynchronous. Ensure you wrap them in a `Task` when calling from synchronous contexts.
109115
</Callout>
110116

@@ -160,14 +166,18 @@ The `Identity` class contains the following properties:
160166
| `organizationTraits` | `OrganizationTraits?` || Additional information about the organization |
161167
| `accountTraits` | `AccountTraits?` || Additional information about the account |
162168

163-
> [!NOTE]
164-
> The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
169+
<Callout intent="note">
170+
The custom fields properties defined as part of the user, organization and account traits, must be configured in the DevRev web app **before** they can be used. See [Object customization](https://devrev.ai/docs/product/object-customization) for more information.
171+
</Callout>
172+
165173
##### UserTraits
166174

167175
The `UserTraits` class contains detailed information about the user:
168176

169-
> [!NOTE]
170-
> All properties in `UserTraits` are optional.
177+
<Callout intent="note">
178+
All properties in `UserTraits` are optional.
179+
</Callout>
180+
171181
| Property | Type | Description |
172182
|----------|------|-------------|
173183
| `displayName` | `String?` | The displayed name of the user |
@@ -181,8 +191,10 @@ The `UserTraits` class contains detailed information about the user:
181191

182192
The `OrganizationTraits` class contains detailed information about the organization:
183193

184-
> [!NOTE]
185-
> All properties in `OrganizationTraits` are optional.
194+
<Callout intent="note">
195+
All properties in `OrganizationTraits` are optional.
196+
</Callout>
197+
186198
| Property | Type | Description |
187199
|----------|------|-------------|
188200
| `displayName` | `String?` | The displayed name of the organization |
@@ -196,8 +208,10 @@ The `OrganizationTraits` class contains detailed information about the organizat
196208

197209
The `AccountTraits` class contains detailed information about the account:
198210

199-
> [!NOTE]
200-
> All properties in `AccountTraits` are optional.
211+
<Callout intent="note">
212+
All properties in `AccountTraits` are optional.
213+
</Callout>
214+
201215
| Property | Type | Description |
202216
|----------|------|-------------|
203217
| `displayName` | `String?` | The displayed name of the account |
@@ -329,7 +343,7 @@ DevRev.resumeAllMonitoring()
329343
You can enable session recording to capture user interactions with your app.
330344

331345
<Callout intent="note">
332-
The session recording feature is opt-in and is enabled by default.
346+
The session recording feature is opt-out and is enabled by default.
333347
</Callout>
334348

335349
The session recording feature includes the following methods to control the recording:
@@ -349,7 +363,7 @@ You can add custom properties to the session recording to help you understand th
349363
DevRev.addSessionProperties(_:)
350364
```
351365

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

354368
```swift
355369
DevRev.clearSessionProperties()
@@ -402,7 +416,7 @@ class MyMaskingProvider: NSObject, DevRev.MaskLocationProviding {
402416
DevRev.setMaskingLocationProvider(MyMaskingProvider())
403417
```
404418

405-
<Callout intent="note">
419+
<Callout intent="tip">
406420
Setting a new provider overrides any previously set masking location provider.
407421
</Callout>
408422

@@ -462,7 +476,7 @@ You need to ensure that your iOS app is configured to receive push notifications
462476

463477
### Register for push notifications
464478

465-
<Callout intent="note">
479+
<Callout intent="tip">
466480
Push notifications require that the SDK has been configured and the user has been identified (unverified and anonymous users). The user identification is required to send the push notification to the correct user.
467481
</Callout>
468482

@@ -532,7 +546,7 @@ Push notifications coming to the DevRev SDK need to be handled manually. To prop
532546
DevRev.processPushNotification(_:)
533547
```
534548

535-
<Callout intent="note">
549+
<Callout intent="tip">
536550
For convenience, this method provides two overloads that accept `userInfo` as either `[AnyHashable: Any]` or `[String: any Sendable]` dictionary types.
537551
</Callout>
538552

fern/docs/pages/sdks/mobile/ios/quickstart.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The DevRev SDK can be integrated using either Swift Package Manager (SPM) or CocoaPods.
44

5-
<Callout intent="note">
5+
<Callout intent="warning">
66
We recommend integrating the DevRev SDK using SPM.
77
</Callout>
88

@@ -13,7 +13,7 @@ To integrate the DevRev SDK into your project using SPM:
1313
1. Open your project in Xcode and navigate to the **Add Package Dependency**.
1414
2. Enter the DevRev SDK URL under **Enter Package URL**:
1515
- For HTTPS: https://github.com/devrev/devrev-sdk-ios
16-
- For SSH: `[email protected]:devrev/devrev-sdk-ios.git`
16+
- For SSH: `[email protected]:devrev/devrev-sdk-ios.git`
1717
3. In the **Build Phases** section of your app target, locate the **Link Binary With Libraries** phase and confirm that `DevRevSDK` is linked. If not, add it by clicking **+** and selecting `DevRevSDK` from the list.
1818

1919
Now you should be able to import and use the DevRev SDK in your project.
@@ -36,7 +36,7 @@ This will install the DevRev SDK in your project, making it ready for use.
3636
2. Under **PLuG settings** copy the value under **Your unique App ID**.
3737
3. After obtaining the credentials, you can configure the DevRev SDK in your app.
3838

39-
<Callout intent="note">
39+
<Callout intent="warning">
4040
The DevRev SDK must be configured before you can use any of its features.
4141
</Callout>
4242

0 commit comments

Comments
 (0)