AdAssetDelegate
@objc(AASDKAdAssetDelegate)
public protocol AdAssetDelegate
Informs its delegate of AdAsset networking events. Optional.
Can be used to track the status of an AdAsset during buffering / pre-caching, if available.
-
Called when the asset data is fully downloaded.
Declaration
Swift
@objc optional func adAssetDidFinishDownloadingData(_ asset: AdAsset)Parameters
assetasset owner
-
Called when a new slice of data has been downloaded for the asset. Progress can be calculated as a 0…1 range e.g
bytesDownloaded/bytesExpectedDeclaration
Swift
@objc optional func adAsset(_ asset: AdAsset, didDownloadDataWith bytesDownloaded: Int64, outOf bytesExpected: Int64)Parameters
assetasset owner
bytesDownloadeddownloaded data progress so far, in bytes
bytesExpectedexpected data to download, in bytes
-
Called when an error was encountered during data download for the asset.
Declaration
Swift
@objc optional func adAsset(_ asset: AdAsset, downloadingFailedWith error: Error)Parameters
assetasset owner
errorthe error