     static let defaultEngine=CKSIncrementalStoreSyncEngine()
     var localStoreMOC:NSManagedObjectContext?
     
-    func getLocalChanges()->[AnyObject]
+    func performSync()
+    {
+        var localChangesInServerRepresentation = self.getLocalChangesInServerRepresentation()
+        var insertedOrUpdatedCKRecords = localChangesInServerRepresentation.insertedOrUpdatedCKRecords
+        var deletedCKRecordIDs = localChangesInServerRepresentation.deletedRecordIDs
+        
+        var fetchChangeToken:AnyObject?
+        if NSUserDefaults.standardUserDefaults().objectForKey(CKSIncrementalStoreSyncEngineFetchChangeTokenKey) != nil
+        {
+            fetchChangeToken=NSUserDefaults.standardUserDefaults().objectForKey(CKSIncrementalStoreSyncEngineFetchChangeTokenKey)
+        }
+        
+        var fetchChangesOperation = CKFetchRecordChangesOperation(recordZoneID: CKRecordZone(zoneName: CKSIncrementalStoreCloudDatabaseCustomZoneName).zoneID, previousServerChangeToken: fetchChangeToken! as! CKServerChangeToken)
+        
+        fetchChangesOperation.recordChangedBlock=({(record)->Void in
+            
+        })
+        
+        fetchChangesOperation.recordWithIDWasDeletedBlock=({(recordID)->Void in
+            
+        })
+        fetchChangesOperation.fetchRecordChangesCompletionBlock=({(serverChangeToken,clientChangeToken,error)->Void in
+            
+            if error == nil
+            {
+                
+            }
+            
+        })
+        var operationQueue = NSOperationQueue()
+        operationQueue.addOperation(fetchChangesOperation)
+    }
+    
+    func getLocalChangesInServerRepresentation()->(insertedOrUpdatedCKRecords:Array<AnyObject>,deletedRecordIDs:Array<AnyObject>)
     {
         var entityNames=self.localStoreMOC?.persistentStoreCoordinator?.managedObjectModel.entities.map({(entity)->String in
             

            var results = self.localStoreMOC?.executeFetchRequest(fetchRequest, error: error)
            if error == nil && results?.count > 0
            {
            }
        }
        return [AnyObject]()
    }
    
    func insertedOrUpdatedCKRecords(fromManagedObjects managedObjects:Array<AnyObject>)->Array<AnyObject>

            return ckRecordID
        })
    }
}
class CKSIncrementalStoreSyncPushNotificationHandler
{
