Type Definitions

The following type definitions are available globally.

  • The upload completion handler.

    Declaration

    Objective-C

    typedef void (^AWSS3TransferUtilityUploadCompletionHandlerBlock)(
        AWSS3TransferUtilityUploadTask *_Nonnull, NSError *_Nullable)

    Swift

    typealias AWSS3TransferUtilityUploadCompletionHandlerBlock = (AWSS3TransferUtilityUploadTask?, UnsafeMutablePointer<Int32>?) -> Void

    Parameters

    task

    The upload task object.

    error

    Returns the error object when the download failed.

  • The upload completion handler for MultiPart.

    Declaration

    Objective-C

    typedef void (^AWSS3TransferUtilityMultiPartUploadCompletionHandlerBlock)(
        AWSS3TransferUtilityMultiPartUploadTask *_Nonnull, NSError *_Nullable)

    Swift

    typealias AWSS3TransferUtilityMultiPartUploadCompletionHandlerBlock = (AWSS3TransferUtilityMultiPartUploadTask?, UnsafeMutablePointer<Int32>?) -> Void

    Parameters

    task

    The upload task object.

    error

    Returns the error object when the download failed.

  • The download completion handler.

    Declaration

    Objective-C

    typedef void (^AWSS3TransferUtilityDownloadCompletionHandlerBlock)(
        AWSS3TransferUtilityDownloadTask *_Nonnull, NSURL *_Nullable,
        NSData *_Nullable, NSError *_Nullable)

    Swift

    typealias AWSS3TransferUtilityDownloadCompletionHandlerBlock = (AWSS3TransferUtilityDownloadTask?, UnsafeMutablePointer<Int32>?, UnsafeMutablePointer<Int32>?, UnsafeMutablePointer<Int32>?) -> Void

    Parameters

    task

    The download task object.

    location

    When downloading an Amazon S3 object to a file, returns a file URL of the returned object. Otherwise, returns nil.

    data

    When downloading an Amazon S3 object as an NSData, returns the returned object as an instance of NSData. Otherwise, returns nil.

    error

    Returns the error object when the download failed. Returns nil on successful downlaod.

  • The transfer progress feedback block.

    Note

    Refer to - URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend: in NSURLSessionTaskDelegate for more details on upload progress and - URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite: in NSURLSessionDownloadDelegate for more details on download progress.

    Declaration

    Objective-C

    typedef void (^AWSS3TransferUtilityProgressBlock)(
        AWSS3TransferUtilityTask *_Nonnull, NSProgress *_Nonnull)

    Swift

    typealias AWSS3TransferUtilityProgressBlock = (AWSS3TransferUtilityUploadTask?, UnsafeMutablePointer<Int32>?) -> Void

    Parameters

    task

    The upload task object.

    progress

    The progress object.

  • The multi part transfer progress feedback block.

    Declaration

    Objective-C

    typedef void (^AWSS3TransferUtilityMultiPartProgressBlock)(
        AWSS3TransferUtilityMultiPartUploadTask *_Nonnull, NSProgress *_Nonnull)

    Swift

    typealias AWSS3TransferUtilityMultiPartProgressBlock = (AWSS3TransferUtilityMultiPartUploadTask?, UnsafeMutablePointer<Int32>?) -> Void

    Parameters

    task

    The upload task object.

    progress

    The progress object.