<!--
{
  "availability" : [
    "iOS: 6.0.0 - 16.0.0",
    "iPadOS: 6.0.0 - 16.0.0",
    "macCatalyst: 13.1.0 - 16.0.0",
    "macOS: 10.8.0 - 13.0.0",
    "tvOS: 9.0.0 - 16.0.0",
    "watchOS: 6.2.0 - 9.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/SKDownload",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKDownload"
  },
  "title" : "SKDownload"
}
-->

# SKDownload

Downloadable content associated with a product.

```
class SKDownload
```

## Overview

When you create a product in App Store Connect, you can associate one or more pieces of downloadable content with it. At runtime, when a product is purchased by a user, your app uses [`SKDownload`](/documentation/StoreKit/SKDownload) objects to download the content from the App Store.

Your app never directly creates a [`SKDownload`](/documentation/StoreKit/SKDownload) object. Instead, after a payment is processed, your app reads the transaction object’s [`downloads`](/documentation/StoreKit/SKPaymentTransaction/downloads) property to retrieve an array of [`SKDownload`](/documentation/StoreKit/SKDownload) objects associated with the transaction.

To download the content, you queue a download object on the payment queue and wait for the content to be downloaded. After a download completes, read the download object’s [`contentURL`](/documentation/StoreKit/SKDownload/contentURL) property to get a URL to the downloaded content. Your app must process the downloaded file before completing the transaction. For example, it might copy the file into a directory whose contents are persistent. When all downloads are complete, you finish the transaction. After the transaction is finished, the download objects cannot be queued to the payment queue and any URLs to the downloaded content are invalid.

## Topics

### Getting Content Information

[`var expectedContentLength: Int64`](/documentation/StoreKit/SKDownload/expectedContentLength)

The length of the downloadable content, in bytes.

[`var contentIdentifier: String`](/documentation/StoreKit/SKDownload/contentIdentifier)

A string that uniquely identifies the downloadable content.

[`var contentVersion: String`](/documentation/StoreKit/SKDownload/contentVersion)

A string that identifies which version of the content is available for download.

[`var transaction: SKPaymentTransaction`](/documentation/StoreKit/SKDownload/transaction)

The transaction associated with the downloadable file.

[`var contentLength: Int64`](/documentation/StoreKit/SKDownload/contentLength)

The length of the downloadable content, in bytes.

### Getting State Information

[`var state: SKDownloadState`](/documentation/StoreKit/SKDownload/state)

The current state of the download object.

[`var progress: Float`](/documentation/StoreKit/SKDownload/progress)

A value that indicates how much of the file has been downloaded.

[`var timeRemaining: TimeInterval`](/documentation/StoreKit/SKDownload/timeRemaining)

An estimated time, in seconds, to finish downloading the content.

[`var SKDownloadTimeRemainingUnknown: TimeInterval`](/documentation/StoreKit/SKDownloadTimeRemainingUnknown)

Indicates that the system cannot determine how much time is needed to finish downloading the content.

[`enum SKDownloadState`](/documentation/StoreKit/SKDownloadState)

The states that a download operation can be in.

[`var downloadState: SKDownloadState`](/documentation/StoreKit/SKDownload/downloadState)

The current state of the download object.

### Accessing a Completed Download

[`var error: (any Error)?`](/documentation/StoreKit/SKDownload/error)

The error that prevented the content from being downloaded.

[`var contentURL: URL?`](/documentation/StoreKit/SKDownload/contentURL)

The local location of the downloaded file.

### Managing Downloaded Content

[`class func contentURL(forProductID: String) -> URL?`](/documentation/StoreKit/SKDownload/contentURL(forProductID:))

Returns the local location for the previously downloaded flie.

[`class func deleteContent(forProductID: String)`](/documentation/StoreKit/SKDownload/deleteContent(forProductID:))

Deletes the previously downloaded file.

## Relationships

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)