Purging the download
When a user deletes a downloaded asset on their device, the client application removes the downloaded asset in parallel or sequentially by calling deleteDownload()
. This purge download operation is asynchronous, as removal is potentially time-consuming.
Example code
The following code example shows how to purge a given downloaded/downloading OTVPersistenceAsset
asset and its related licence.
if true == self.otvPersistenceManager?.deleteDownload(asset: (asset)!) {
NotificationCenter.default.post(name: .notificationDownloadRemoved,
object: nil, userInfo: nil)
}