Downloadable content associated with a product.
- iOS 6.0+
- macOS 10.8+
- tvOS 9.0+
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 objects to download the content from the App Store.
Your app never directly creates a
SKDownload object. Instead, after a payment is processed, your app reads the transaction object’s
downloads property to retrieve an array of
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
content 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.