iosamazon-web-servicesamazon-s3awss3transfermanagerawss3transferutility

AWS / iOS SDK: when should I use AWSS3TransferManager and AWSS3TransferUtility?


What is the difference in usage between AWSS3TransferManager and AWSS3TransferUtility in the Amazon S3 iOS SDK?

Here is what the documentation says for AWSS3TransferManager:

High level utility for managing transfers to Amazon S3. S3TransferManager provides a simple API for uploading and downloading content to Amazon S3, and makes extensive use of Amazon S3 multipart uploads to achieve enhanced throughput, performance and reliability.

and for AWSS3TransferUtility:

A high-level utility for managing background uploads and downloads. The transfers continue even when the app is suspended. You must call + application:handleEventsForBackgroundURLSession:completionHandler: in the - application:handleEventsForBackgroundURLSession:completionHandler: application delegate in order for the background transfer callback to work.

From the description the major difference seem to be that AWSS3TransferUtility is designed for background tasks.

Is this correct? Does this mean that I shouldn't use AWSS3TransferManager for background tasks? It seems counter intuitive as most of the transfers will be likely to happen as a separate background thread in a mobile client.


Solution

  • Sorry about this, it is a little confusing. By 'background' it does not mean off of the main thread, though these transfer are off of the main thread, rather it means when your app is in the background.

    Transfer Manager:

    Transfer Utility: