Skip to content

Commit 3ec7677

Browse files
committed
Add missing doc
1 parent 99af618 commit 3ec7677

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Sources/UpgradeAlert/UpgradeAlert.swift

+7-1
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,15 @@ extension UpgradeAlert {
7373
*/
7474
extension UpgradeAlert {
7575
/**
76-
* fixme: add doc
76+
* A typealias for the completion handler used in network calls to fetch `AppInfo`.
77+
* - Description: This completion handler is invoked after attempting to fetch app information from the App Store. It provides either the `AppInfo` object upon success or a `UAError` if an error occurred during the fetch operation.
78+
* - Parameters:
79+
* - AppInfo?: An optional `AppInfo` object containing the app's metadata retrieved from the App Store.
80+
* - UAError?: An optional `UAError` describing any error encountered during the network request.
81+
* - Remark: This typealias simplifies the signature of completion handlers used in asynchronous network operations within the `UpgradeAlert` module.
7782
*/
7883
typealias Completion = (AppInfo?, UAError?) -> Void
84+
typealias Completion = (AppInfo?, UAError?) -> Void
7985
/**
8086
* - Description: Retrieves the app information from the App Store using a network request. This function fetches the JSON data from the App Store API and decodes it to `AppInfo` format, handling errors appropriately.
8187
* let url = URL(string: "http://www.")

Sources/UpgradeAlert/helper/AppInfo.swift

+4-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ public struct AppInfo: Decodable {
3131
*/
3232
public let trackViewUrl: String
3333
// ⚠️️ new
34-
// fixme: add doc
34+
/**
35+
* The release date of the current version of the application.
36+
* - Description: Specifies the date when the current version of the application was released on the App Store, represented as a string. This information is used to determine if the app was released recently and to adjust update prompts accordingly.
37+
*/
3538
public let currentVersionReleaseDate: String
3639
/**
3740
* Initializes a new instance of `AppInfo`.

0 commit comments

Comments
 (0)