Skip to content

Commit a696462

Browse files
committed
Add comments
1 parent e0647dd commit a696462

File tree

4 files changed

+21
-0
lines changed

4 files changed

+21
-0
lines changed

Sources/SentryDistribution/Models/CheckForUpdateParams.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ import Foundation
22

33
/// A model for configuring parameters needed to check for app updates.
44
public struct CheckForUpdateParams {
5+
/// Creates a new instance with the required parameters for update checking.
6+
/// - Parameters:
7+
/// - accessToken: Bearer token for authentication with Sentry API
8+
/// - organization: Sentry organization slug
9+
/// - project: Sentry project slug
10+
/// - hostname: Sentry hostname (defaults to "us.sentry.io")
11+
/// - binaryIdentifierOverride: Optional UUID override for the main binary
12+
/// - appIdOverride: Optional bundle identifier override
513
public init(accessToken: String, organization: String, project: String, hostname: String = "us.sentry.io", binaryIdentifierOverride: String? = nil, appIdOverride: String? = nil) {
614
self.accessToken = accessToken
715
self.organization = organization

Sources/SentryDistribution/Models/ReleaseInfo.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
import Foundation
22

3+
/// Information about a release version returned from the update check API.
34
public struct ReleaseInfo: Decodable {
5+
/// Unique identifier for the release
46
public let id: String
7+
/// Build version string (e.g., "1.2.3")
58
public let buildVersion: String
9+
/// Build number (e.g., 123)
610
public let buildNumber: Int
11+
/// Optional release notes describing changes
712
public let releaseNotes: String?
13+
/// URL to download the IPA file
814
public let downloadUrl: String
15+
/// Optional URL to the app icon
916
public let iconUrl: String?
17+
/// Display name of the app
1018
public let appName: String
1119
private let createdDate: String
1220

21+
/// Parsed creation date from the server response
1322
public var created: Date? {
1423
Date.fromString(createdDate)
1524
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import Foundation
22

3+
/// Response from the update check API containing current and available release information.
34
public struct UpdateCheckResponse: Decodable {
5+
/// Information about the currently installed release
46
public let current: ReleaseInfo?
7+
/// Information about the available update (nil if no update available)
58
public let update: ReleaseInfo?
69
}

Sources/SentryDistribution/Updater.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Foundation
22
import UIKit
33

4+
/// A class for checking and installing app updates from Sentry's distribution service.
45
public final class Updater {
56

67
// MARK: - Public

0 commit comments

Comments
 (0)