MMMPureLoadable

Objective-C

@interface MMMPureLoadable : NSObject <MMMPureLoadable>

Swift

class MMMPureLoadable : NSObject, MMMPureLoadableProtocol

A basic implementation of MMMPureLoadable that does not require to override anything. Typically you would have an object that instead of vending these objects directly would vend them as id<MMMPureLoadable>, so the state controls are visible to your main object only and don’t distract the end user.

  • Undocumented

    Declaration

    Objective-C

    - (id)init NS_DESIGNATED_INITIALIZER;

    Swift

    init()
  • Transitions the object into the ‘syncing’ without touching the current value of contentsAvailable.

    Declaration

    Objective-C

    - (void)setSyncing;

    Swift

    func setSyncing()
  • Transitions the object into the ‘failed’ state setting the error field to the given value

    • and contentsAvailable to NO.

    Declaration

    Objective-C

    - (void)setFailedToSyncWithError:(nullable NSError *)error;

    Swift

    func setFailedToSyncWithError(_ error: (any Error)?)
  • Transitions the object into the ‘synced successfully’ state clearing the error field

    • and setting contentsAvailable to YES.

    Declaration

    Objective-C

    - (void)setDidSyncSuccessfully;

    Swift

    func setDidSyncSuccessfully()