Skip to content

Commit 5407b11

Browse files
committed
Fix all documentation warnings for Xcode 16
1 parent 5387e7b commit 5407b11

9 files changed

+25
-30
lines changed

Sources/Cache/DiskStorage.swift

+8-5
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,11 @@ public enum DiskStorage {
137137
///
138138
/// - Parameters:
139139
/// - value: The value to be stored.
140-
/// - key: The key to which the `value` will be stored. If there is already a value under the key,
141-
/// the old value will be overwritten by the new `value`.
140+
/// - key: The key to which the `value` will be stored. If there is already a value under the key, the old
141+
/// value will be overwritten by the new `value`.
142142
/// - expiration: The expiration policy used by this storage action.
143143
/// - writeOptions: Data writing options used for the new files.
144+
/// - forcedExtension: The file extension, if exists.
144145
/// - Throws: An error during converting the value to a data format or during writing it to disk.
145146
public func store(
146147
value: T,
@@ -214,6 +215,7 @@ public enum DiskStorage {
214215
/// Retrieves a value from the storage.
215216
/// - Parameters:
216217
/// - key: The cache key of the value.
218+
/// - forcedExtension: The file extension, if exists.
217219
/// - extendingExpiration: The expiration policy used by this retrieval action.
218220
/// - Throws: An error during converting the data to a value or during the operation of disk files.
219221
/// - Returns: The value under `key` if it is valid and found in the storage; otherwise, `nil`.
@@ -291,7 +293,8 @@ public enum DiskStorage {
291293
/// - Returns: `true` if there is valid data under the key and file extension; otherwise, `false`.
292294
///
293295
/// > This method does not actually load the data from disk, so it is faster than directly loading the cached
294-
/// value by checking the nullability of the ``DiskStorage/Backend/value(forKey:extendingExpiration:)`` method.
296+
/// value by checking the nullability of the
297+
/// ``DiskStorage/Backend/value(forKey:forcedExtension:extendingExpiration:)`` method.
295298
public func isCached(forKey key: String, forcedExtension: String? = nil) -> Bool {
296299
return isCached(forKey: key, referenceDate: Date(), forcedExtension: forcedExtension)
297300
}
@@ -306,8 +309,8 @@ public enum DiskStorage {
306309
/// - Returns: `true` if there is valid data under the key; otherwise, `false`.
307310
///
308311
/// If you pass `Date()` as the `referenceDate`, this method is identical to
309-
/// ``DiskStorage/Backend/isCached(forKey:)``. Use the `referenceDate` to determine whether the cache is still
310-
/// valid for a future date.
312+
/// ``DiskStorage/Backend/isCached(forKey:forcedExtension:)``. Use the `referenceDate` to determine whether the
313+
/// cache is still valid for a future date.
311314
public func isCached(forKey key: String, referenceDate: Date, forcedExtension: String? = nil) -> Bool {
312315
do {
313316
let result = try value(

Sources/Cache/ImageCache.swift

+6-4
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ open class ImageCache: @unchecked Sendable {
667667
/// as a result. Otherwise, a ``KingfisherError`` result with detailed failure reason will be sent.
668668
///
669669
/// > This method is marked as `open` for compatibility purposes only. Do not override this method. Instead,
670-
/// override the version ``ImageCache/retrieveImage(forKey:options:callbackQueue:completionHandler:)-1m1bb`` that
670+
/// override the version ``ImageCache/retrieveImageInDiskCache(forKey:options:callbackQueue:completionHandler:)``
671671
/// accepts a ``KingfisherParsedOptionsInfo`` value.
672672
open func retrieveImage(
673673
forKey key: String,
@@ -938,7 +938,7 @@ open class ImageCache: @unchecked Sendable {
938938
///
939939
/// > The return value does not contain information about the kind of storage the cache matches from.
940940
/// > To obtain information about the cache type according to ``CacheType``, use
941-
/// ``ImageCache/imageCachedType(forKey:processorIdentifier:)`` instead.
941+
/// ``ImageCache/imageCachedType(forKey:processorIdentifier:forcedExtension:)`` instead.
942942
public func isCached(
943943
forKey key: String,
944944
processorIdentifier identifier: String = DefaultImageProcessor.default.identifier,
@@ -1009,7 +1009,7 @@ open class ImageCache: @unchecked Sendable {
10091009
/// > This method does not guarantee that there is an image already cached in the returned path. It simply provides
10101010
/// > the path where the image should be if it exists in the disk storage.
10111011
/// >
1012-
/// > You could use the ``ImageCache/isCached(forKey:processorIdentifier:)`` method to check whether the image is
1012+
/// > You could use the ``ImageCache/isCached(forKey:processorIdentifier:forcedExtension:)`` method to check whether the image is
10131013
/// cached under that key on disk if necessary.
10141014
open func cachePath(
10151015
forKey key: String,
@@ -1083,6 +1083,7 @@ open class ImageCache: @unchecked Sendable {
10831083
/// - key: The key used for caching the image.
10841084
/// - identifier: The identifier of the processor being used for caching. If you are using a processor for the
10851085
/// image, pass the identifier of the processor to this parameter.
1086+
/// - forcedExtension: The file extension, if exists.
10861087
/// - serializer: The ``CacheSerializer`` used to convert the `image` and `original` to the data that will be
10871088
/// stored to disk. By default, the ``DefaultCacheSerializer/default`` will be used.
10881089
/// - toDisk: Whether this image should be cached to disk or not. If `false`, the image is only cached in memory.
@@ -1138,6 +1139,7 @@ open class ImageCache: @unchecked Sendable {
11381139
/// - key: The key used for caching the image.
11391140
/// - identifier: The identifier of the processor being used for caching. If you are using a processor for the
11401141
/// image, pass the identifier of the processor to this parameter.
1142+
/// - forcedExtension: The file extension, if exists.
11411143
/// - fromMemory: Whether this image should be removed from memory storage or not. If `false`, the image won't be
11421144
/// removed from the memory storage. The default is `true`.
11431145
/// - fromDisk: Whether this image should be removed from the disk storage or not. If `false`, the image won't be
@@ -1196,7 +1198,7 @@ open class ImageCache: @unchecked Sendable {
11961198
/// - Throws: An error of type ``KingfisherError``, if any error happens inside Kingfisher framework.
11971199
///
11981200
/// > This method is marked as `open` for compatibility purposes only. Do not override this method. Instead,
1199-
/// override the version ``ImageCache/retrieveImage(forKey:options:callbackQueue:completionHandler:)-1m1bb`` that
1201+
/// override the version ``ImageCache/retrieveImage(forKey:options:callbackQueue:completionHandler:)-1jjo3`` that
12001202
/// accepts a ``KingfisherParsedOptionsInfo`` value.
12011203
open func retrieveImage(
12021204
forKey key: String,

Sources/Documentation.docc/CommonTasks/CommonTasks_Downloader.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ class AsyncModifier: AsyncImageDownloadRequestModifier {
6565
```
6666

6767
Similarly, use the ``KingfisherOptionsInfoItem/requestModifier(_:)`` to apply this modifier. In such scenarios, the
68-
``KingfisherWrapper/setImage(with:placeholder:options:progressBlock:completionHandler:)-2uid3`` or
69-
``ImageDownloader/downloadImage(with:options:completionHandler:)-5x6sa`` method will no longer return a ``DownloadTask``
68+
``KingfisherWrapper/setImage(with:placeholder:options:progressBlock:completionHandler:)-8lmr3`` or
69+
``ImageDownloader/downloadImage(with:options:completionHandler:)-2ztyq`` method will no longer return a ``DownloadTask``
7070
directly, as the download task isn't initiated instantly. To reference the task, monitor the
7171
``AsyncImageDownloadRequestModifier/onDownloadTaskStarted`` callback.
7272

Sources/Documentation.docc/CommonTasks/CommonTasks_Processor.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ struct MyProcessor: ImageProcessor {
107107
}
108108
```
109109

110-
Then pass it to the ``KingfisherWrapper/setImage(with:placeholder:options:completionHandler:)-3ft7a`` methods:
110+
Then pass it to the ``KingfisherWrapper/setImage(with:placeholder:options:completionHandler:)-9h820`` methods:
111111

112112
```swift
113113
let processor = MyProcessor(someValue: 10)

Sources/Documentation.docc/CommonTasks/CommonTasks_Serializer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ struct MyCacheSerializer: CacheSerializer {
5555
}
5656
```
5757

58-
Then pass it to the ``KingfisherWrapper/setImage(with:placeholder:options:completionHandler:)-3ft7a`` methods:
58+
Then pass it to the ``KingfisherWrapper/setImage(with:placeholder:options:completionHandler:)-9h820`` methods:
5959

6060
```swift
6161
let serializer = MyCacheSerializer()

Sources/General/KF.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ extension KF.Builder {
344344
#endif
345345

346346
/// Sets a placeholder image which is used while retrieving the image.
347-
/// - Parameter placeholder: An image to show while retrieving the image from its source.
347+
/// - Parameters:
348+
/// - image: An image to show while retrieving the image from its source.
348349
/// - Returns: A ``KF/Builder`` with changes applied.
349350
public func placeholder(_ image: KFCrossPlatformImage?) -> Self {
350351
self.placeholder = image

Sources/Networking/ImageDownloader+LivePhoto.swift

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public struct LivePhotoResourceDownloadingResult: Sendable {
4141
/// Creates an `ImageDownloadResult` object.
4242
///
4343
/// - Parameters:
44-
/// - image: The image of the download result.
4544
/// - url: The URL from which the image was downloaded.
4645
/// - originalData: The binary data of the image.
4746
public init(originalData: Data, url: URL? = nil) {

Sources/Networking/ImageDownloaderDelegate.swift

+4-14
Original file line numberDiff line numberDiff line change
@@ -57,30 +57,20 @@ public protocol ImageDownloaderDelegate: AnyObject {
5757
didFinishDownloadingImageForURL url: URL,
5858
with response: URLResponse?,
5959
error: (any Error)?)
60-
60+
6161
/// Called when the ``ImageDownloader`` object successfully downloads image data with a specified task.
6262
///
63-
/// This is your last chance to verify or modify the downloaded data before Kingfisher attempts to perform
63+
/// This is your last chance to verify or modify the downloaded data before Kingfisher attempts to perform
6464
/// additional processing on the image data.
6565
///
6666
/// - Parameters:
6767
/// - downloader: The ``ImageDownloader`` object used for the downloading operation.
6868
/// - data: The original downloaded data.
69-
/// - dataTask: The data task containing request and response information for the download.
70-
///
69+
/// - task: The data task containing request and response information for the download.
7170
/// - Returns: The data that Kingfisher should use to create an image. You need to provide valid data that is in
7271
/// one of the supported image file formats. Kingfisher will process this data and attempt to convert it into an
7372
/// image object.
74-
///
75-
///
76-
/// This method can be used to preprocess raw image data before the creation of the `Image` instance (e.g.,
77-
/// decrypting or verification). If `nil` is returned, the processing is interrupted and a
78-
/// ``KingfisherError/ResponseErrorReason/dataModifyingFailed(task:)`` error will be raised. You can use this fact
79-
/// to stop the image processing flow if you find that the data is corrupted or malformed.
80-
///
81-
/// > If this method is implemented, the `URL` version of
82-
/// ``ImageDownloaderDelegate/imageDownloader(_:didDownload:for:)-5btcl`` will not be called anymore.
83-
func imageDownloader(_ downloader: ImageDownloader, didDownload data: Data, with dataTask: SessionDataTask) -> Data?
73+
func imageDownloader(_ downloader: ImageDownloader, didDownload data: Data, with task: SessionDataTask) -> Data?
8474

8575
/// Called when the ``ImageDownloader`` object successfully downloads image data from a specified URL.
8676
///

Sources/Networking/RedirectHandler.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public struct AnyRedirectHandler: ImageDownloadRedirectHandler {
7373

7474
/// Creates a value of ``ImageDownloadRedirectHandler`` that executes the `modify` block.
7575
///
76-
/// - Parameter modify: The block that modifies the request when a request modification task is triggered.
76+
/// - Parameter handle: The block that modifies the request when a request modification task is triggered.
7777
public init(handle: @escaping @Sendable (SessionDataTask, HTTPURLResponse, URLRequest, @escaping (URLRequest?) -> Void) -> Void) {
7878
block = handle
7979
}

0 commit comments

Comments
 (0)