DownloadProgressListener
public protocol DownloadProgressListener
Interface that provides information about the edition download progress.
-
Called when the download actually starts.
Declaration
Swift
@MainActor func editionWillStartDownload(edition: Edition)
-
Called whenever the download progress changes.
progress
range is[0, 1]
, but it can be < 0 if the progress is undetermined. WhenisBeingPreparedForPresentation
is true the download is completed but there are some needed operations going on until the edition can be presented.Declaration
Swift
@MainActor func editionDownloadProgress( edition: Edition, progress: Float, isBeingPreparedForPresentation: Bool )
-
Called when the edition is downloaded and ready for presentation, see
EditionPresenter.openEdition
.Declaration
Swift
@MainActor func editionDidDownload(edition: Edition)
-
Called if the download fails.
error
is aDownloadError
which can let you know if the failure was because of entitlement.Declaration
Swift
@MainActor func editionDidFailDownload(edition: Edition, error: DownloadError)