From 0b255bc70105b351b07ecd95ac832789cd4e773c Mon Sep 17 00:00:00 2001 From: Sebastian Villena <97059974+ruisebas@users.noreply.github.com> Date: Fri, 13 Sep 2024 15:46:36 -0400 Subject: [PATCH] chore: Marking Storage's key-based API as deprecated in the Category implementation. (#3863) --- .../Storage/StorageCategory+ClientBehavior.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Amplify/Categories/Storage/StorageCategory+ClientBehavior.swift b/Amplify/Categories/Storage/StorageCategory+ClientBehavior.swift index 55b69bbe43..e9197c34ce 100644 --- a/Amplify/Categories/Storage/StorageCategory+ClientBehavior.swift +++ b/Amplify/Categories/Storage/StorageCategory+ClientBehavior.swift @@ -9,6 +9,7 @@ import Foundation extension StorageCategory: StorageCategoryBehavior { + @available(*, deprecated, message: "Use getURL(path:options:)") @discardableResult public func getURL( key: String, @@ -25,6 +26,7 @@ extension StorageCategory: StorageCategoryBehavior { try await plugin.getURL(path: path, options: options) } + @available(*, deprecated, message: "Use downloadData(path:options:)") @discardableResult public func downloadData( key: String, @@ -41,6 +43,7 @@ extension StorageCategory: StorageCategoryBehavior { plugin.downloadData(path: path, options: options) } + @available(*, deprecated, message: "Use downloadFile(path:options:)") @discardableResult public func downloadFile( key: String, @@ -59,6 +62,7 @@ extension StorageCategory: StorageCategoryBehavior { plugin.downloadFile(path: path, local: local, options: options) } + @available(*, deprecated, message: "Use uploadData(path:options:)") @discardableResult public func uploadData( key: String, @@ -77,6 +81,7 @@ extension StorageCategory: StorageCategoryBehavior { plugin.uploadData(path: path, data: data, options: options) } + @available(*, deprecated, message: "Use uploadFile(path:options:)") @discardableResult public func uploadFile( key: String, @@ -95,6 +100,7 @@ extension StorageCategory: StorageCategoryBehavior { plugin.uploadFile(path: path, local: local, options: options) } + @available(*, deprecated, message: "Use remove(path:options:)") @discardableResult public func remove( key: String, @@ -111,6 +117,7 @@ extension StorageCategory: StorageCategoryBehavior { try await plugin.remove(path: path, options: options) } + @available(*, deprecated, message: "Use list(path:options:)") @discardableResult public func list( options: StorageListOperation.Request.Options? = nil