Downloadable
public protocol Downloadable : AnyObject
Protocol for observing, binding and (re)creating objects which can be downloaded
-
Fabric initializer
Declaration
Swift
init?(_ downloadableUniqueId: String)Parameters
downloadableUniqueIdunique ID for identifying specific object in this type of objects
-
Unique ID for identifying specific object in this type of objects
Declaration
Swift
var downloadUniqueId: String { get } -
Remote file/source URL
Declaration
Swift
var downloadRemoteUrl: URL { get } -
Local/target URL
Declaration
Swift
var downloadLocalUrl: URL { get }
-
observe(by:)Extension methodAdding listener who observes this
Downloadabledownloading progressDeclaration
Swift
func observe(by observer: DownloadStatusListner)Parameters
observerobserver which listenes
-
resumeDownload()Extension methodStarts/Resumes download. Should not be called before downloading service is ready - can appear multiple identical downloads.
Declaration
Swift
public func resumeDownload() -> SelfReturn Value
returns object which is binded to dowload service and can be observed etc.
-
cancelDownload()Extension methodCancelles downloading
Declaration
Swift
public func cancelDownload() -
isDownloadingExtension methodGets downloading status
Declaration
Swift
public var isDownloading: Bool { get }
-
isDownloadLocalFileExistExtension methodChecks if file already downloaded
Declaration
Swift
public var isDownloadLocalFileExist: Bool { get }
Downloadable Protocol Reference