Download Class
A Download object represents downloadable content associated with a product. When you create a product in iTunes Connect, you can associate one or more pieces of downloadable content with it. Then, at runtime, when a product is purchased by a user, your app uses Download objects to download the content from the App Store.
Item Index
Properties
contentID
    String
    
    
    
        read-only
    
    
    
    A string that uniquely identifies the downloadable content.
contentLength
    Number
    
    
    
        read-only
    
    
    
    The length of the downloadable content, in bytes.
contentURL
    String
    
    
    
        read-only
    
    
    
    The local location of the downloaded file.
The value of this property is valid only when the state property is set to DOWNLOAD_STATE_FINISHED.
The URL becomes invalid after the purchase associated with the download is completed.
contentVersion
    String
    
    
    
        read-only
    
    
    
    A string that identifies which version of the content is available for download. The version string must be formatted as a series of integers separated by periods.
errorCode
    Number
    
    
    
        read-only
    
    
    
    The code of the error that prevented the content from being downloaded.
errorMessage
    String
    
    
    
        read-only
    
    
    
    The error message associated with a failed download.
progress
    Number
    
    
    
        read-only
    
    
    
    A value that indicates how much of the file has been downloaded.
The value of this property is a floating point number between 0.0 and 1.0, inclusive, where 0.0 means no data has been download and 1.0 means all the data has been downloaded. Typically, your app uses the value of this property to update a user interface element, such as a progress bar, that displays how much of the file has been downloaded.
Do not use the value of this property to determine whether the download has completed. Instead, use the state property.
state
    String
    
    
    
        read-only
    
    
    
    The current state of the download object.
Possible values are DOWNLOAD_STATE_WAITING, DOWNLOAD_STATE_ACTIVE, DOWNLOAD_STATE_PAUSED, DOWNLOAD_STATE_FINISHED, DOWNLOAD_STATE_FAILED, and DOWNLOAD_STATE_CANCELED,
timeRemaining
    Number
    
    
    
        read-only
    
    
    
    An estimated time, in seconds, to finish downloading the content.
The system attempts to estimate how long it will take to finish downloading the file. If it cannot create a good estimate, the value of this property is set to DOWNLOAD_TIME_UNKNOWN,
