Skip to content

Commit 00fe54a

Browse files
author
Ruben Nine
committed
Adding discardable annotations to deprecated and Objective-C upload functions.
1 parent ad4a223 commit 00fe54a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

FilestackSDK/Public/Extensions/Client+Deprecated.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Foundation
1010

1111
extension Client {
1212
/// :nodoc:
13+
@discardableResult
1314
@objc
1415
@available(*, deprecated, message: "Marked for removal in version 3.0. Please use upload(using:options:queue:uploadProgress:completionHandler:) instead")
1516
public func multiPartUpload(from localURL: URL,
@@ -31,6 +32,7 @@ extension Client {
3132
}
3233

3334
/// :nodoc:
35+
@discardableResult
3436
@objc
3537
@available(*, deprecated, message: "Marked for removal in version 3.0. Please use upload(using:options:queue:uploadProgress:completionHandler:) instead")
3638
public func multiFileUpload(from localURLs: [URL],

FilestackSDK/Public/Extensions/Client+ObjC.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ extension Client {
3131
/// - Parameter completionHandler: Adds a handler to be called once the upload has finished.
3232
///
3333
/// - Returns: An `Uploader` that allows starting, cancelling and monitoring the upload.
34+
@discardableResult
3435
@objc public func uploadURL(using localURL: NSURL,
3536
options: UploadOptions = .defaults,
3637
queue: DispatchQueue = .main,
@@ -63,6 +64,7 @@ extension Client {
6364
/// - Parameter completionHandler: Adds a handler to be called once the upload has finished.
6465
///
6566
/// - Returns: An `Uploader` that allows starting, cancelling and monitoring the upload.
67+
@discardableResult
6668
@objc public func uploadMultipleURLs(using localURLs: [NSURL],
6769
options: UploadOptions = .defaults,
6870
queue: DispatchQueue = .main,
@@ -95,6 +97,7 @@ extension Client {
9597
/// - Parameter completionHandler: Adds a handler to be called once the upload has finished.
9698
///
9799
/// - Returns: An `Uploader` that allows starting, cancelling and monitoring the upload.
100+
@discardableResult
98101
@objc public func uploadData(using data: NSData,
99102
options: UploadOptions = .defaults,
100103
queue: DispatchQueue = .main,
@@ -127,6 +130,7 @@ extension Client {
127130
/// - Parameter completionHandler: Adds a handler to be called once the upload has finished.
128131
///
129132
/// - Returns: An `Uploader` that allows starting, cancelling and monitoring the upload.
133+
@discardableResult
130134
@objc public func uploadMultipleData(using multipleData: [NSData],
131135
options: UploadOptions = .defaults,
132136
queue: DispatchQueue = .main,

0 commit comments

Comments
 (0)