Skip to content

Commit fece9ca

Browse files
committed
fix: add public init for app info
1 parent e925fb0 commit fece9ca

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

Sources/ITunesSearchClient/AppInfo.swift

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
//
1919
// AppInfo.swift
20-
//
20+
//
2121
//
2222
// Created by Mykhailo Bondarenko on 12.04.2024.
2323
//
@@ -41,4 +41,19 @@ public struct AppInfo {
4141
self.bundleId = result.bundleId
4242
self.currentVersionReleaseDate = result.currentVersionReleaseDate
4343
}
44+
45+
/// Initializes a new `AppInfo` instance with optional parameters.
46+
/// - Parameters:
47+
/// - version: The version of the app.
48+
/// - bundleId: The bundle ID of the app.
49+
/// - currentVersionReleaseDate: The date the current version of the app was released in ISO 8601 format (YYYY-MM-DD).
50+
public init(
51+
version: String? = nil,
52+
bundleId: String? = nil,
53+
currentVersionReleaseDate: String? = nil
54+
) {
55+
self.version = version
56+
self.bundleId = bundleId
57+
self.currentVersionReleaseDate = currentVersionReleaseDate
58+
}
4459
}

0 commit comments

Comments
 (0)