Skip to content

Commit 379855e

Browse files
committed
Release 1.1.2
1 parent 943152e commit 379855e

File tree

185 files changed

+1135
-172
lines changed

Some content is hidden

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

185 files changed

+1135
-172
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ 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.2] - 2025-03-06
9+
10+
### Changed
11+
- Enhanced the session analytics feature to work better across different environments.
12+
13+
### Removed
14+
- Removed the support for automatic processing of DevRev push notifications. For more info, please refer to the integration guide (README.md).
15+
816
## [1.1.1] - 2025-02-25
917

1018
### Fixed

DevRevSDK.doccarchive.zip

-19 Bytes
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.1.1"
3+
spec.version = "1.1.2"
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.1.1/DevRevSDK.xcframework.zip",
10+
http: "https://github.com/devrev/devrev-sdk-ios/releases/download/v1.1.2/DevRevSDK.xcframework.zip",
1111
type: :zip,
1212
headers: [
1313
"Accept: application/octet-stream",

DevRevSDK.xcframework.zip

-34.8 KB
Binary file not shown.

MIGRATION.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Migration Guide
2+
This guide and chart should help facilitate the transition from the legacy UserExperior SDK to the new DevRev SDK in your iOS application, providing insights into feature equivalents and method changes.
3+
4+
## Feature Equivalence Chart
5+
6+
| Feature | UserExperior SDK | DevRev SDK |
7+
|-|-|-|
8+
| Installation | `pod 'UserExperior', '~> <version>` | SPM: `https://github.com/devrev/devrev-sdk-ios`<br />CocoaPods: `pod 'DevRevSDK', '~> <version>` |
9+
| Initialization | `UserExperior.startRecording(_ versionKey: String)` | `DevRev.configure(appID: String)` |
10+
| User Identification | `UserExperior.setUserIdentifier(_ userIdentifier: String)` | `DevRev.identifyAnonymousUser(userID: String)`<br />`DevRev.identifyUnverifiedUser(_ identity: Identity)`<br />`DevRev.updateUser(_ identity: Identity)`<br /> `identifyVerifiedUser( _ userID: String, sessionToken: String)`<br />`DevRev.logout(deviceID: String)` |
11+
| Event Tracking | `UserExperior.logEvent(_ eventName: String)` | `DevRev.trackEvent(name: String, properties: [String: String])` |
12+
| Session Recording | `UserExperior.stopRecording()`<br />`UserExperior.pauseRecording()`<br />`UserExperior.resumeRecording()` | `DevRev.startRecording()`<br />`DevRev.stopRecording()`<br />`DevRev.pauseRecording()`<br />`DevRev.resumeRecording()`<br />`DevRev.processAllOnDemandSessions()` |
13+
| Opting in/out | `UserExperior.consentOptIn()`<br />`UserExperior.consentOptOut()`<br />`UserExperior.getConsentStatus`<br />`UserExperior.getOptOutStatus` | `DevRev.stopAllMonitoring()`<br />`DevRev.resumeAllMonitoring()` |
14+
| Session Properties | `UserExperior.setUserProperties(_ properties: [String: Any])` | `DevRev.addSessionProperties(properties: [String: String])`<br />`DevRev.clearSessionProperties()` |
15+
| Masking Sensitive Data | `UserExperior.markSensitiveViews(_ viewsToSecure: NSArray)`<br />`UserExperior.unmarkSensitiveViews(_ viewsToSecure: NSArray)` | `DevRev.markSensitiveViews(_ sensitiveViews: [UIView])`<br />`DevRev.unmarkSensitiveViews(_ sensitiveViews: [UIView])` |
16+
| Timers | `UserExperior.startTimer(_ timerName: String)`<br />`UserExperior.endTimer(_ timerName: String)` | `DevRev.startTimer(_ name: String, properties: [String: String])`<br />`DevRev.stopTimer(_ name: String, properties: [String: String])` |
17+
| PLuG support chat | Not supported. | `DevRev.showSupport(isAnimated: Bool)`<br />`DevRev.showSupport(from parentViewController: UIViewController, isAnimated: Bool)`<br />`DevRev.showSupport(from navigationController: UINavigationController, isAnimated: Bool)`<br />`DevRev.createSupportConversation(isAnimated: Bool)`<br />`DevRev.shouldDismissModalsOnOpenLink`<br />`DevRev.inAppLinkHandler` |
18+
| Push Notifications | Not supported. | `DevRev.registerDeviceToken(_ deviceToken: Data, deviceID: String)`<br />`DevRev.processPushNotification(_ userInfo: [String: String])` |

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.1.1/DevRevSDK.xcframework.zip",
22-
checksum: "549a08539cf2601ec7e73b67ae5a58979d917b3f4daa5f30ebf3e66b74315095"
21+
url: "https://github.com/devrev/devrev-sdk-ios/releases/download/v1.1.2/DevRevSDK.xcframework.zip",
22+
checksum: "53381d4c965b14a7b37a0a77cf3647bac3a97bfd7f1e8921406a1f4d294cec31"
2323
)
2424
]
2525
)

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,12 +457,15 @@ Task {
457457
```
458458

459459
#### Handle push notifications
460-
To properly handle push notifications, implement the following method, typically in either the `UNUserNotificationCenterDelegate.userNotificationCenter(_:didReceive:)` or `UIApplicationDelegate.application(_:didReceiveRemoteNotification:fetchCompletionHandler:)`:
460+
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:)`:
461461

462462
```swift
463463
DevRev.processPushNotification(_:)
464464
```
465465

466+
> [!IMPORTANT]
467+
> For convenience, this method provides two overloads that accept `userInfo` as either `[AnyHashable: Any]` or `[String: any Sendable]` dictionary types.
468+
466469
##### Example
467470
```swift
468471
func userNotificationCenter(

Samples/SampleSwiftUI/HomeView.swift

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import Foundation
2+
import SwiftUI
3+
import DevRevSDK
4+
5+
struct HomeView: View {
6+
@SwiftUI.State private var isConfigured = false
7+
@SwiftUI.State private var isUserIdentified = false
8+
@SwiftUI.State private var isMonitoringEnabled = false
9+
10+
var body: some View {
11+
NavigationView {
12+
List {
13+
Section(header: Text("Status")) {
14+
StatusRow(
15+
status: "Is the SDK configured?",
16+
isComplete: $isConfigured
17+
)
18+
StatusRow(
19+
status: "Is the user identified?",
20+
isComplete: $isUserIdentified
21+
)
22+
StatusRow(
23+
status: "Is session monitoring enabled?",
24+
isComplete: $isMonitoringEnabled
25+
)
26+
}
27+
28+
Section(header: Text("Features")) {
29+
NavigationLink(destination: IdentificationView()) {
30+
Text("Identification")
31+
}
32+
NavigationLink(destination: PushNotificationsView()) {
33+
Text("Push Notifications")
34+
}
35+
NavigationLink(destination: SupportView()) {
36+
Text("Support")
37+
}
38+
NavigationLink(destination: SessionAnalyticsView()) {
39+
Text("Session Analytics")
40+
}
41+
}
42+
43+
Section(header: Text("Debug")) {
44+
Button(
45+
action: {
46+
print("The app will crash now!")
47+
let array = [Int]()
48+
_ = array[1]
49+
}
50+
) {
51+
Text("Force a crash")
52+
}
53+
}
54+
}
55+
.navigationTitle("DevRev SDK")
56+
.navigationBarItems(trailing: RefreshButton(action: updateStatuses))
57+
.refreshable {
58+
await updateStatuses()
59+
}
60+
.task {
61+
await updateStatuses()
62+
}
63+
}
64+
}
65+
66+
private func updateStatuses() async {
67+
isConfigured = await DevRev.isConfigured
68+
isUserIdentified = await DevRev.isUserIdentified
69+
isMonitoringEnabled = DevRev.isMonitoringEnabled
70+
}
71+
}
72+
73+
#Preview {
74+
HomeView()
75+
}

Samples/SampleSwiftUI/SampleApp.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ struct SampleApp: App {
77

88
var body: some Scene {
99
WindowGroup {
10-
ContentView()
10+
HomeView()
1111
}
1212
}
1313
}

Samples/SampleUIKit/.DS_Store

-2 KB
Binary file not shown.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Foundation
2+
import UIKit
3+
import DevRevSDK
4+
5+
enum AlertPresenter {
6+
static func show(on viewController: UIViewController, title: String, message: String) {
7+
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
8+
alert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))
9+
viewController.present(alert, animated: true, completion: nil)
10+
}
11+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import Foundation
2+
import UIKit
3+
4+
class StatusTableViewCell: UITableViewCell {
5+
@IBOutlet private weak var titleLabel: UILabel!
6+
@IBOutlet private weak var statusImageView: UIImageView!
7+
8+
func configure(with title: String, status: Bool) {
9+
titleLabel?.text = title
10+
statusImageView?.image = UIImage(systemName: status ? "checkmark.circle.fill" : "circle")
11+
}
12+
13+
override func prepareForReuse() {
14+
super.prepareForReuse()
15+
titleLabel?.text = nil
16+
statusImageView?.image = nil
17+
}
18+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3+
<device id="retina6_12" orientation="portrait" appearance="light"/>
4+
<dependencies>
5+
<deployment identifier="iOS"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
7+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
8+
</dependencies>
9+
<objects>
10+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
11+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
12+
<tableViewCell clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" rowHeight="83" id="RyN-Oy-nDW" customClass="StatusTableViewCell" customModule="SampleUIKit" customModuleProvider="target">
13+
<rect key="frame" x="0.0" y="0.0" width="419" height="83"/>
14+
<autoresizingMask key="autoresizingMask"/>
15+
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="RyN-Oy-nDW" id="0bo-Q9-jgJ">
16+
<rect key="frame" x="0.0" y="0.0" width="419" height="83"/>
17+
<autoresizingMask key="autoresizingMask"/>
18+
<subviews>
19+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WtV-Ck-aW1">
20+
<rect key="frame" x="15" y="31" width="355" height="21"/>
21+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
22+
<nil key="textColor"/>
23+
<nil key="highlightedColor"/>
24+
</label>
25+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="pSg-iY-JYc">
26+
<rect key="frame" x="378" y="24" width="25" height="35"/>
27+
<constraints>
28+
<constraint firstAttribute="height" constant="35" id="3Mo-Y8-49Q"/>
29+
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="25" id="YUg-N7-kkn"/>
30+
<constraint firstAttribute="width" constant="25" id="p9C-wv-smU"/>
31+
<constraint firstAttribute="width" constant="25" id="tt3-Vk-pob"/>
32+
</constraints>
33+
</imageView>
34+
</subviews>
35+
<constraints>
36+
<constraint firstItem="pSg-iY-JYc" firstAttribute="leading" secondItem="WtV-Ck-aW1" secondAttribute="trailing" constant="8" id="BlD-NU-WPY"/>
37+
<constraint firstItem="pSg-iY-JYc" firstAttribute="centerY" secondItem="0bo-Q9-jgJ" secondAttribute="centerY" id="CaQ-SG-Z9h"/>
38+
<constraint firstAttribute="trailing" secondItem="pSg-iY-JYc" secondAttribute="trailing" constant="16" id="FbX-vh-CJc"/>
39+
<constraint firstItem="WtV-Ck-aW1" firstAttribute="centerY" secondItem="0bo-Q9-jgJ" secondAttribute="centerY" id="UPV-qz-4La"/>
40+
<constraint firstItem="WtV-Ck-aW1" firstAttribute="leading" secondItem="0bo-Q9-jgJ" secondAttribute="leading" constant="15" id="alf-qE-aon"/>
41+
</constraints>
42+
</tableViewCellContentView>
43+
<connections>
44+
<outlet property="statusImageView" destination="pSg-iY-JYc" id="sNZ-t5-xxZ"/>
45+
<outlet property="titleLabel" destination="WtV-Ck-aW1" id="otY-JZ-czH"/>
46+
</connections>
47+
<point key="canvasLocation" x="-144.27480916030532" y="-259.50704225352115"/>
48+
</tableViewCell>
49+
</objects>
50+
</document>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Foundation
2+
import UIKit
3+
4+
class TextInputTableViewCell: UITableViewCell {
5+
@IBOutlet weak var textField: UITextField!
6+
7+
func configure(with text: String) {
8+
textField?.placeholder = text
9+
}
10+
11+
override func prepareForReuse() {
12+
super.prepareForReuse()
13+
textField?.text = nil
14+
textField?.placeholder = nil
15+
}
16+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3+
<device id="retina6_12" orientation="portrait" appearance="light"/>
4+
<dependencies>
5+
<deployment identifier="iOS"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
7+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
8+
</dependencies>
9+
<objects>
10+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
11+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
12+
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" id="VzQ-NN-8jK" customClass="TextInputTableViewCell" customModule="SampleUIKit" customModuleProvider="target">
13+
<rect key="frame" x="0.0" y="0.0" width="393" height="44"/>
14+
<autoresizingMask key="autoresizingMask"/>
15+
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="VzQ-NN-8jK" id="aik-bJ-B4B">
16+
<rect key="frame" x="0.0" y="0.0" width="393" height="44"/>
17+
<autoresizingMask key="autoresizingMask"/>
18+
<subviews>
19+
<textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="1h5-ej-Pps">
20+
<rect key="frame" x="16" y="8" width="361" height="28"/>
21+
<fontDescription key="fontDescription" type="system" pointSize="14"/>
22+
<textInputTraits key="textInputTraits"/>
23+
</textField>
24+
</subviews>
25+
<constraints>
26+
<constraint firstItem="1h5-ej-Pps" firstAttribute="top" secondItem="aik-bJ-B4B" secondAttribute="top" constant="8" id="2p4-Ia-N6T"/>
27+
<constraint firstItem="1h5-ej-Pps" firstAttribute="leading" secondItem="aik-bJ-B4B" secondAttribute="leading" constant="16" id="AlM-sT-Zr8"/>
28+
<constraint firstAttribute="bottom" secondItem="1h5-ej-Pps" secondAttribute="bottom" constant="8" id="DSZ-kW-Auc"/>
29+
<constraint firstAttribute="trailing" secondItem="1h5-ej-Pps" secondAttribute="trailing" constant="16" id="LcD-2O-fXZ"/>
30+
</constraints>
31+
</tableViewCellContentView>
32+
<connections>
33+
<outlet property="textField" destination="1h5-ej-Pps" id="sTv-gZ-ub6"/>
34+
</connections>
35+
<point key="canvasLocation" x="-37" y="-133"/>
36+
</tableViewCell>
37+
</objects>
38+
</document>

Samples/SampleUIKit/Constants/Constants.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ enum Constants {
99
static let sessionAnalytics = "SessionAnalyticsCell"
1010
static let support = "SupportCell"
1111
static let main = "MainCell"
12+
static let status = "StatusCell"
13+
static let textField = "TextFieldCell"
1214
}
1315
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import Foundation
2+
import UIKit
3+
4+
extension UITableViewCell {
5+
static func dequeue(
6+
from tableView: UITableView,
7+
at indexPath: IndexPath,
8+
reuseIdentifier: String
9+
) -> Self {
10+
guard
11+
let cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier, for: indexPath) as? Self
12+
else {
13+
fatalError("Could not dequeue a cell for \(reuseIdentifier)! For nib-backed cells, check if the class name has been set in the nib itself.")
14+
}
15+
16+
return cell
17+
}
18+
}

0 commit comments

Comments
 (0)