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:

- (id)initWithDelegate:(id<MSSyncContextDelegate>)delegate dataSource:(id<MSSyncContextDataSource>)dataSource callback:(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

- (NSOperation *)pushWithCompletion:(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) 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) id<MSSyncContextDataSource> dataSource

Discussion

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

Declared In

MSSyncContext.h