iOS SDK

API Reference

On This Page

MGLOfflinePackState

enum MGLOfflinePackState {}

The state an offline pack is currently in.

MGLOfflinePackStateUnknown

It is unknown whether the pack is inactive, active, or complete.

This is the initial state of a pack. The state of a pack becomes known by the time the shared MGLOfflineStorage object sends the first MGLOfflinePackProgressChangedNotification about the pack. For inactive packs, you must explicitly request a progress update using the -[MGLOfflinePack requestProgress] method.

An invalid pack always has a state of MGLOfflinePackStateInvalid, never MGLOfflinePackStateUnknown.

Declaration

Objective-C

MGLOfflinePackStateUnknown = 0

Swift

case unknown = 0

MGLOfflinePackStateInactive

The pack is incomplete and is not currently downloading.

This is the initial state of a pack that is created using the -[MGLOfflineStorage addPackForRegion:withContext:completionHandler:] method, as well as after the -[MGLOfflinePack suspend] method is called.

Declaration

Objective-C

MGLOfflinePackStateInactive = 1

Swift

case inactive = 1

MGLOfflinePackStateActive

The pack is incomplete and is currently downloading.

This is the state of a pack after the -[MGLOfflinePack resume] method is called.

Declaration

Objective-C

MGLOfflinePackStateActive = 2

Swift

case active = 2

MGLOfflinePackStateComplete

The pack has downloaded to completion.

Declaration

Objective-C

MGLOfflinePackStateComplete = 3

Swift

case complete = 3

MGLOfflinePackStateInvalid

The pack has been removed using the -[MGLOfflineStorage removePack:withCompletionHandler:] method. Sending any message to the pack will raise an exception.

Declaration

Objective-C

MGLOfflinePackStateInvalid = 4

Swift

case invalid = 4