MTOfflineDownloadDelegate
public protocol MTOfflineDownloadDelegate : AnyObject, Sendable
Delegate protocol for receiving offline download events.
-
Called when the pack’s state changes.
Declaration
Swift
func offlinePack(_ pack: String, didChangeState state: MTOfflinePackState)Parameters
packThe ID of the offline pack.
stateThe new state of the pack.
-
Called when the pack’s download progress updates.
Declaration
Swift
func offlinePack(_ pack: String, didUpdateProgress progress: MTOfflinePackProgress)Parameters
packThe ID of the offline pack.
progressThe current progress of the download.
-
Called when a single resource download fails.
Declaration
Swift
func offlinePack(_ pack: String, didFailResource error: MTOfflineError, context: MTOfflineContext)Parameters
packThe ID of the offline pack.
errorThe error that occurred.
contextThe context of the failure (e.g. URL).
-
Called when a single resource download succeeds.
Declaration
Swift
func offlinePack(_ pack: String, didSucceedResource context: MTOfflineContext)Parameters
packThe ID of the offline pack.
contextThe context of the success (e.g. URL).