MSSyncContext Class Reference

Inherits from NSObject
Declared in MSSyncContext.h

Overview

The MSSyncContext object controls how offline operations using the MSSyncTable object are processed, stored in local data storage, and sent to the mobile service.

Initializing the MSSyncContext Object

– initWithDelegate:dataSource:callback:

- (nonnull instancetype)initWithDelegate:(nullable id<MSSyncContextDelegate>)delegate dataSource:(nullable id<MSSyncContextDataSource>)dataSource callback:(nullable NSOperationQueue *)callbackQueue

Syncing and Storing Data

  pendingOperationsCount

Returns the number of pending outbound operations on the queue

@property (nonatomic, readonly) NSUInteger pendingOperationsCount

Discussion

Returns the number of pending outbound operations on the queue

Declared In

MSSyncContext.h

– pushWithCompletion:

Executes all current pending operations on the queue

- (nonnull NSOperation *)pushWithCompletion:(nullable MSSyncBlock)completion

Discussion

Executes all current pending operations on the queue

Declared In

MSSyncContext.h

  delegate

Specifies the delegate that will be used in the resolution of syncing issues

@property (nonatomic, strong, nullable) id<MSSyncContextDelegate> delegate

Discussion

Specifies the delegate that will be used in the resolution of syncing issues

Declared In

MSSyncContext.h

  dataSource

Specifies the dataSource that owns the local data and store of operations

@property (nonatomic, strong, nullable) id<MSSyncContextDataSource> dataSource

Discussion

Specifies the dataSource that owns the local data and store of operations

Declared In

MSSyncContext.h