Skip to content

Commit 73c58a1

Browse files
committed
Release 1.1.0
1 parent e1a571c commit 73c58a1

File tree

208 files changed

+1409
-235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

208 files changed

+1409
-235
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.1.0] - 2025-02-18
9+
10+
### Added
11+
- Introducing a logout mechanism that clears the user's credentials, unregisters the device from receiving push notifications, and stops the session recording.
12+
- Added a boolean flag to check if the SDK has been configured.
13+
- Added a boolean flag to check if the user has been identified.
14+
- Added a boolean flag to check if the session is being recorded.
15+
- Added a boolean flag to check if the monitoring is enabled.
16+
- Added a boolean flag to check if the on-demand sessions are enabled.
17+
818
## [1.0.3] - 2025-02-03
919

1020
### Fixed

DevRevSDK.doccarchive.zip

29.5 KB
Binary file not shown.

DevRevSDK.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Pod::Spec.new do |spec|
22
spec.name = "DevRevSDK"
3-
spec.version = "1.0.3"
3+
spec.version = "1.1.0"
44
spec.summary = "DevRev SDK, used for integrating DevRev services into your iOS app."
55
spec.homepage = "https://devrev.ai"
66
spec.license = "Apache 2.0"
77
spec.author = { "DevRev" => "[email protected]" }
88
spec.platform = :ios, "15.0"
99
spec.source = {
10-
http: "https://github.com/devrev/devrev-sdk-ios/releases/download/v1.0.3/DevRevSDK.xcframework.zip",
10+
http: "https://github.com/devrev/devrev-sdk-ios/releases/download/v1.1.0/DevRevSDK.xcframework.zip",
1111
type: :zip,
1212
headers: [
1313
"Accept: application/octet-stream",

DevRevSDK.xcframework.zip

25.1 KB
Binary file not shown.

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ let package = Package(
1818
targets: [
1919
.binaryTarget(
2020
name: "DevRevSDK",
21-
url: "https://github.com/devrev/devrev-sdk-ios/releases/download/v1.0.3/DevRevSDK.xcframework.zip",
22-
checksum: "9aac35d9bb90cd6ef32be7ef034476c7b36b32383b141237ab38d60e4a4fde51"
21+
url: "https://github.com/devrev/devrev-sdk-ios/releases/download/v1.1.0/DevRevSDK.xcframework.zip",
22+
checksum: "92e229b89a1d8da8479e226c8e9f1e570fc05693fc9ba463cc460664bbb8a96a"
2323
)
2424
]
2525
)

README.md

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ DevRev SDK, used for integrating DevRev services into your iOS app.
1414
- [Identification](#identification)
1515
- [Anonymous identification](#anonymous-identification)
1616
- [Unverified identification](#unverified-identification)
17-
- [Verified identification](#verified-identification)
17+
- [Verified identification](#verified-identification)
1818
- [Updating the user](#updating-the-user)
19+
- [Logout](#logout)
1920
- [Examples](#examples)
2021
- [PLuG support chat](#plug-support-chat)
2122
- [UIKit](#uikit)
@@ -95,6 +96,11 @@ The SDK will be ready for use once you execute the following configuration metho
9596
```swift
9697
DevRev.configure(appID:)
9798
```
99+
Use this property to check whether the DevRev SDK has been configured:
100+
```swift
101+
await DevRev.isConfigured
102+
```
103+
98104
For example:
99105

100106
```swift
@@ -136,7 +142,7 @@ DevRev.identifyUnverifiedUser(_:)
136142

137143
The function accepts the `DevRev.Identity` structure, with the user identifier (`userID`) as the only required property, all other properties are optional.
138144

139-
### Verified identification
145+
#### Verified identification
140146
The verified identification method is used to identify the user with a unique identifier and verify the user's identity with the DevRev backend.
141147

142148
```swift
@@ -150,11 +156,25 @@ You can update the user's information using the following method:
150156
DevRev.updateUser(_:)
151157
```
152158

159+
Use this property to check whether the user is identified in the current session:
160+
```swift
161+
await DevRev.isUserIdentified
162+
```
163+
153164
The function accepts the `DevRev.Identity` structure.
154165

155166
> [!IMPORTANT]
156167
> The `userID` property can *not* be updated.
157168
169+
#### Logout
170+
You can perform a logout of the current user by calling the following method:
171+
172+
```swift
173+
DevRev.logout(deviceID:)
174+
```
175+
176+
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.
177+
158178
#### Examples
159179

160180
> [!NOTE]
@@ -273,6 +293,11 @@ To opt back in, use the following method:
273293
DevRev.resumeAllMonitoring()
274294
```
275295

296+
You can check whether session monitoring has been enabled by using this property:
297+
```swift
298+
DevRev.isMonitoringEnabled
299+
```
300+
276301
#### Session recording
277302
You can enable session recording to capture user interactions with your app.
278303

@@ -288,6 +313,16 @@ The session recording feature includes the following methods to control the reco
288313
|`DevRev.resumeRecording()`|Resumes a paused session recording.|
289314
|`DevRev.processAllOnDemandSessions()`| Stops the ongoing user recording and sends all on-demand sessions along with the current recording. |
290315

316+
Using this property will return the status of the session recording:
317+
```swift
318+
DevRev.isRecording
319+
```
320+
321+
To check if on-demand sessions are enabled, use:
322+
```swift
323+
DevRev.areOnDemandSessionsEnabled
324+
```
325+
291326
#### Session properties
292327
You can add custom properties to the session recording to help you understand the context of the session. The properties are defined as a dictionary of string values.
293328

Samples/.DS_Store

0 Bytes
Binary file not shown.

Samples/SampleSwiftUI/.DS_Store

-2 KB
Binary file not shown.

Samples/SampleSwiftUI/AppDelegate.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ class AppDelegate: NSObject, UIApplicationDelegate {
77

88
#warning("The sample app needs a development team set for code signing.")
99
#warning("Enter your credentials here!")
10-
private let appID = "DvRvStPZG9uOmNvcmU6ZHZydi11cy0xOmRldm8vM2ZBSEVDOnBsdWdfc2V0dGluZy8xX198fF9fMjAyNC0wNy0yOSAwOTozMjoxNC4xNjU1Mjc4NTggKzAwMDAgVVRDxlxendsDvRv"
11-
private let testOrganizer = UITestOrganizer()
10+
let testOrganizer = UITestOrganizer()
11+
private let appID = "<APPID>"
1212

1313
// MARK: - App lifecycle
1414

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
import Foundation
2+
import SwiftUI
3+
4+
struct AsyncButton<Label: View>: View {
5+
var action: () async -> Void
6+
var actionOptions = Set(ActionOption.allCases)
7+
@ViewBuilder var label: () -> Label
8+
@State private var isDisabled = false
9+
@State private var showProgressView = false
10+
11+
var body: some View {
12+
Button(
13+
action: {
14+
if actionOptions
15+
.contains(
16+
.disableButton
17+
) {
18+
isDisabled = true
19+
}
20+
21+
Task {
22+
var progressViewTask: Task<
23+
Void,
24+
Error
25+
>?
26+
27+
if actionOptions
28+
.contains(
29+
.showProgressView
30+
) {
31+
progressViewTask = Task {
32+
try await Task
33+
.sleep(
34+
nanoseconds: 150_000_000
35+
)
36+
showProgressView = true
37+
}
38+
}
39+
40+
await action()
41+
progressViewTask?.cancel()
42+
43+
isDisabled = false
44+
showProgressView = false
45+
}
46+
},
47+
label: {
48+
ZStack {
49+
label().opacity(showProgressView ? 0 : 1)
50+
51+
if showProgressView {
52+
ProgressView()
53+
}
54+
}
55+
}
56+
)
57+
.disabled(
58+
isDisabled
59+
)
60+
}
61+
}
62+
63+
extension AsyncButton {
64+
enum ActionOption: CaseIterable {
65+
case disableButton
66+
case showProgressView
67+
}
68+
}
69+
70+
extension AsyncButton where Label == Text {
71+
init(
72+
_ label: String,
73+
actionOptions: Set<ActionOption> = Set(
74+
ActionOption.allCases
75+
),
76+
action: @escaping () async -> Void
77+
) {
78+
self.init(action: action) { Text(label) }
79+
}
80+
}
81+
82+
extension AsyncButton where Label == Image {
83+
init(
84+
systemImageName: String,
85+
actionOptions: Set<ActionOption> = Set(
86+
ActionOption.allCases
87+
),
88+
action: @escaping () async -> Void
89+
) {
90+
self.init(action: action) { Image(systemName: systemImageName) }
91+
}
92+
}

0 commit comments

Comments
 (0)