Inherits from TICDSOperation : NSOperation
Declared in TICDSSynchronizationOperation.h

Overview

The TICDSSynchronizationOperation class describes a generic operation used by the TICoreDataSync framework to synchronize changes made to a document.

In brief, a synchronization operation applies remote sync commands and changes locally, fixing any conflicts if necessary.

In full, the operation carries out the following tasks: (Sync Command tasks are included below, although not yet implemented)

  1. Go through each SyncChangeSet and:
    1. Check for conflicts against local changes made since the last synchronization.
    2. Fix any conflicts, and build an array of conflict warnings for issues that cannot be resolved.
    3. Apply each SyncChange in the set to the local WholeStore.
    4. Add the UUID of the set to the list of AppliedSyncChangeSets.ticdsync.

Operations are typically created automatically by the relevant sync manager.

You need not use one of the subclasses of TICDSSynchronizationOperation.

Tasks

Designated Initializer

Properties

  •   synchronizationWarnings

    The warnings generated during this synchronization.

    property
  •   paused

    A boolean indicating whether the operation is currently paused awaiting an instruction to continue, e.g. for conflict resolution.

    property
  •   mostRecentConflictResolutionType

    The resolution type for the most recent conflict, set before resuming the operation after a conflict is detected.

    property

File Locations

Properties

appliedSyncChangeSetsFileLocation

The location of this document’s AppliedSyncChangeSets.ticdsync file.

@property (strong) NSURL *appliedSyncChangeSetsFileLocation

Declared In

TICDSSynchronizationOperation.h

localSyncChangesToMergeURL

The location of the SyncChangesBeingSynchronized.syncchg file for this synchronization operation.

@property (strong) NSURL *localSyncChangesToMergeURL

Declared In

TICDSSynchronizationOperation.h

mostRecentConflictResolutionType

The resolution type for the most recent conflict, set before resuming the operation after a conflict is detected.

@property (assign) TICDSSyncConflictResolutionType mostRecentConflictResolutionType

Declared In

TICDSSynchronizationOperation.h

paused

A boolean indicating whether the operation is currently paused awaiting an instruction to continue, e.g. for conflict resolution.

@property (assign, getter=isPaused) BOOL paused

Declared In

TICDSSynchronizationOperation.h

syncTransaction

The sync transaction to be used by this operation.

@property TICDSSyncTransaction *syncTransaction

Declared In

TICDSSynchronizationOperation.h

syncTransactions

The sync transactions whose unsaved applied sync change files will be used as persistent stores to augment the applied sync changes managed object context.

@property NSArray *syncTransactions

Declared In

TICDSSynchronizationOperation.h

synchronizationWarnings

The warnings generated during this synchronization.

@property (strong) NSMutableArray *synchronizationWarnings

Declared In

TICDSSynchronizationOperation.h

unappliedSyncChangeSetsFileLocation

The location of this document’s UnappliedSyncChangeSets.ticdsync file.

@property (strong) NSURL *unappliedSyncChangeSetsFileLocation

Declared In

TICDSSynchronizationOperation.h

unappliedSyncChangesDirectoryLocation

The location of the UnappliedSyncChanges directory for this synchronization operation.

@property (strong) NSURL *unappliedSyncChangesDirectoryLocation

Declared In

TICDSSynchronizationOperation.h

Instance Methods

configureBackgroundApplicationContextForPrimaryManagedObjectContext:

Configure a background context (for applying sync changes) using the same persistent store coordinator as the main application context.

- (void)configureBackgroundApplicationContextForPrimaryManagedObjectContext:(NSManagedObjectContext *)managedObjectContext

Parameters

aPersistentStoreCoordinator

The persistent store coordinator to use for the background context.

Declared In

TICDSSynchronizationOperation.h

initWithDelegate:

Initialize a synchronization operation using a delegate that supports the TICDSSynchronizationOperationDelegate protocol.

- (id)initWithDelegate:(NSObject<TICDSSynchronizationOperationDelegate> *)aDelegate

Parameters

aDelegate

The delegate to use for this operation.

Return Value

An initialized synchronization operation.

Declared In

TICDSSynchronizationOperation.h