CONNECT Player SDK 5 for Apple (FPS)
5.14.x 5.13.x 5.12.x 5.11.x 5.10.x 5.9.x 5.8.x 5.7.x 5.6.x 5.5.x 5.4.x 5.3.x 5.2.x 5.1.x 5.0.x
5.14.x 5.13.x 5.12.x 5.11.x 5.10.x 5.9.x 5.8.x 5.7.x 5.6.x 5.5.x 5.4.x 5.3.x 5.2.x 5.1.x 5.0.x

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)
}