aws-sdk-ios icon indicating copy to clipboard operation
aws-sdk-ios copied to clipboard

Discrepancy in API Availability between CocoaPods and Swift Package Manager for AWSS3TransferUtilityUploadTask

Open DrunkardSworder opened this issue 10 months ago • 2 comments

State your question When using AWSS3TransferUtilityUploadTask via Swift Package Manager (SPM), I encountered a discrepancy in the availability of certain API methods compared to when using CocoaPods. Specifically, under SPM, I encountered an error message stating "Value of type 'AWSS3TransferUtilityUploadTask' has no member 'completeWithError'". However, the same API functions perfectly when using CocoaPods.

image

Which AWS Services are you utilizing? AWSS3 AWSCore

Environment(please complete the following information):

  • SDK Version: 2.36.0
  • Dependency Manager: [SPM]
  • Swift Version : [5.0+]

DrunkardSworder avatar Apr 24 '24 04:04 DrunkardSworder

Hi @DrunkardSworder, thanks for opening this issue. Could you provide us with more details as to which SPM package version of the SDK you are using, and which pod version? Do you have a screenshot of the code you see with SPM? (assuming that screenshot corresponds to the cocapods installation since I can see completeWithError there. Any code snippets for us to use during reproducing this would be helpful as well.

lawmicha avatar Apr 24 '24 16:04 lawmicha

Hi @DrunkardSworder! It appears that these methods defined in the AWSS3TransferUtilityTasks+Completion.h file were meant to be used internally only, which is why you don't see them when consuming through SPM. But they show up in CocoaPods due to how the AWSS3.podspec file is defined.

Completing tasks is solely the responsibility of the AWSS3TransferUtility, attempting to manually do so would result in unexpected behaviour.

Could you please tell us if this is something that you actively need (and the use case for it), or were you just wondering about this discrepancy?

Thanks

ruisebas avatar May 06 '24 16:05 ruisebas