Package apple.cloudkit
Class CKSyncEngine
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.cloudkit.CKSyncEngine
-
- All Implemented Interfaces:
NSObject
public class CKSyncEngine extends NSObject
`CKSyncEngine` encapsulates the logic of syncing data with a CloudKit database. Syncing with CloudKit involves many moving pieces. Apps need to schedule syncs, create and batch operations, subscribe to database changes, listen for push notifications, store sync state, handle a multitude of errors, and more. `CKSyncEngine` is designed to encapsulate this logic in a higher-level API. # Start Your Sync Engine Generally, you should initialize your `CKSyncEngine` soon after your process launches. The sync engine will perform work in the background on your behalf, and it needs to be initialized so that it can properly listen for push notifications and handle scheduled sync tasks. When initializing your sync engine, you need to provide an object conforming to the ``CKSyncEngineDelegate`` protocol. This protocol is the main method of communication between the sync engine and your app. You also need to provide your last known version of the ``CKSyncEngine/State/Serialization``. See ``CKSyncEngine/State`` and ``Event/StateUpdate`` for more details on the sync engine state. Note that before using `CKSyncEngine` in your app, you need to add the CloudKit and remote notification capabilities. # Sending Changes to the Server In order to send changes to the server, you first need to tell the sync engine you have pending changes to send. You can do this by adding pending changes to the sync engine's ``CKSyncEngine/state`` property. When you add pending changes to the state, the sync engine will schedule a task to sync. When the sync task runs, the sync engine will start sending changes to the server. The sync engine will automatically send database changes from ``State/pendingDatabaseChanges``, but you need to provide the record zone changes yourself. In order to send record zone changes, you need to return them from ``CKSyncEngineDelegate/nextRecordZoneChangeBatch(_:syncEngine:)``. When the sync engine finishes sending a batch of changes to the server, your `CKSyncEngineDelegate` will receive ``Event/sentDatabaseChanges(_:)`` and ``Event/sentRecordZoneChanges(_:)`` events. These events will notify you of the success or failure of the changes you tried to send. At a high level, sending changes to the server happens with the following order of operations: 1. You add pending changes to ``CKSyncEngine/state``. 2. You receive ``Event/willSendChanges(_:)`` in ``CKSyncEngineDelegate/handleEvent(_:syncEngine:)`` 3. If there are pending database changes, the sync engine sends the next batch. 4. If any database changes were sent, your delegate receives``Event/sentDatabaseChanges(_:)``. 5. Repeat from step 3 until all pending database changes are sent, then move on to record zone changes in step 6. 6. The sync engine asks for the next batch of record zone changes by calling ``CKSyncEngineDelegate/nextRecordZoneChangeBatchToSend(_:syncEngine:)``. 7. The sync engine sends the next record zone change batch to the server. 8. If any record zone changes were sent, your delegate receives ``Event/sentRecordZoneChanges(_:)``. 9. If you added any pending database changes during steps 6-8, the sync engine repeats from step 3. Otherwise, it repeats from step 6. 10. When all pending changes are sent, your delegate receives ``Event/didSendChanges(_:)``. # Fetching Changes from the Server The sync engine will automatically listen for remote notifications, and it will fetch changes from the server when necessary. Generally, you'll receive events in this order: 1. Your delegate receives ``Event/willFetchChanges(_:)``. 2. If there are new database changes to fetch, you receive batches of them in ``Event/fetchedDatabaseChanges(_:)`` events. 3. If there are new record zone changes to fetch, you will receive ``Event/willFetchRecordZoneChanges(_:)`` for each zone that has new changes. 4. The sync engine fetches record zone changes and gives you batches of them in ``Event/fetchedRecordZoneChanges(_:)`` events. 5. Your delegate receives ``Event/didFetchRecordZoneChanges(_:)`` for each zone that had changes to fetch. 6. Your delegate receives ``Event/didFetchChanges(_:)``, indicating that sync engine has finished fetching changes. # Sync Scheduling ## Automatic sync By default, the sync engine will automatically schedule sync tasks on your behalf. If the user is signed in, the device has a network connection, and the system is generally in a good state, these scheduled syncs will happen relatively quickly. However, if the device has no network, is low on power, or is otherwise under a heavy load, these automatic syncs might be delayed. Similarly, if the user isn't signed in to an account, the sync engine won't perform any sync tasks at all. ## Manual sync Generally, you should rely on this automatic sync behavior, but there may be some cases where you want to manually trigger a sync. For example, if you have a pull-to-refresh UI, you can call ``CKSyncEngine/fetchChanges(_:)`` to tell the sync engine to fetch immediately. Or if you want to provide some sort of "backup now" button, you can call ``CKSyncEngine/sendChanges(_:)`` to send to the server immediately. ### Testing These manual sync functions might also be useful during automated testing. When writing automated tests, you can turn off automatic sync via ``CKSyncEngine/Configuration/automaticallySync``. Then, you'll have complete control over the ordering of sync events. This allows you to interject behavior in the sync flow and simulate specific sequences of events. # Error Handling There are some transient errors that the sync engine will handle automatically behind the scenes. The sync engine will retry the operations for these transient errors automatically when it makes sense to do so. Specifically, the sync engine will handle the following errors on your behalf: * ``CKErrorCode/notAuthenticated`` * ``CKErrorCode/accountTemporarilyUnavailable`` * ``CKErrorCode/networkFailure`` * ``CKErrorCode/networkUnavailable`` * ``CKErrorCode/requestRateLimited`` * ``CKErrorCode/serviceUnavailable`` * ``CKErrorCode/zoneBusy`` When the sync engine encounters one of these errors, it will wait for the system to be in a good state and try again. For example, if the server sends back a `.requestRateLimited` error, the sync engine will respect this throttle and try again after the retry-after time. `CKSyncEngine` will _not_ handle errors that require application-specific logic. For example, if you try to save a record and get a ``CKErrorCode/serverRecordChanged``, you need to handle that error yourself. There are plenty of errors that the sync engine cannot handle on your behalf, see ``CKErrorCode`` for a list of all the possible errors. # Accounts `CKSyncEngine` monitors for account status, and it will only sync if there's an account signed in. Because of this, you can initialize your `CKSyncEngine` at any time, regardless of account status. If there is no account, or if the user disabled sync in settings, the sync engine will stay dormant in the background. Once an account is available, the sync engine will start syncing automatically. It will also listen for when the user signs in or out of their account. When it notices an account change, it will send an ``Event/accountChange(_:)`` to your delegate. It's your responsibility to react appropriately to this change and update your local persistence. API-Since: 17.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCKSyncEngine.Block_cancelOperationsWithCompletionHandlerstatic interfaceCKSyncEngine.Block_fetchChangesWithCompletionHandlerstatic interfaceCKSyncEngine.Block_fetchChangesWithOptionsCompletionHandlerstatic interfaceCKSyncEngine.Block_sendChangesWithCompletionHandlerstatic interfaceCKSyncEngine.Block_sendChangesWithOptionsCompletionHandler-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCKSyncEngine(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static CKSyncEnginealloc()static CKSyncEngineallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)voidcancelOperationsWithCompletionHandler(@Nullable CKSyncEngine.Block_cancelOperationsWithCompletionHandler completionHandler)Cancels any currently executing or pending sync operations.static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()@NotNull CKDatabasedatabase()The database this sync engine will sync with.static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()voidfetchChangesWithCompletionHandler(@Nullable CKSyncEngine.Block_fetchChangesWithCompletionHandler completionHandler)Fetches changes from the server immediately, bypassing the system scheduler.voidfetchChangesWithOptionsCompletionHandler(@NotNull CKSyncEngineFetchChangesOptions options, @Nullable CKSyncEngine.Block_fetchChangesWithOptionsCompletionHandler completionHandler)Fetches changes from the server with the specified options.static longhash_static()CKSyncEngineinit()CKSyncEngineinitWithConfiguration(@NotNull CKSyncEngineConfiguration configuration)Initializes a `CKSyncEngine` with the given configuration.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)static CKSyncEnginenew_objc()static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsendChangesWithCompletionHandler(@Nullable CKSyncEngine.Block_sendChangesWithCompletionHandler completionHandler)Sends any pending changes to the server immediately, bypassing the system scheduler.voidsendChangesWithOptionsCompletionHandler(@NotNull CKSyncEngineSendChangesOptions options, @Nullable CKSyncEngine.Block_sendChangesWithOptionsCompletionHandler completionHandler)Sends pending changes to the server with the specified options.static voidsetVersion_static(long aVersion)@NotNull CKSyncEngineStatestate()A collection of state properties used to efficiently manage sync engine operation.static org.moe.natj.objc.Classsuperclass_static()static booleanuseStoredAccessor()Deprecated.static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static CKSyncEngine alloc()
-
allocWithZone
public static CKSyncEngine allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
cancelOperationsWithCompletionHandler
public void cancelOperationsWithCompletionHandler(@Nullable @Nullable CKSyncEngine.Block_cancelOperationsWithCompletionHandler completionHandler)Cancels any currently executing or pending sync operations. Note that cancellation does not happen synchronously, and it's possible some in-flight operations will succeed.
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
-
database
@NotNull public @NotNull CKDatabase database()
The database this sync engine will sync with.
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
fetchChangesWithCompletionHandler
public void fetchChangesWithCompletionHandler(@Nullable @Nullable CKSyncEngine.Block_fetchChangesWithCompletionHandler completionHandler)Fetches changes from the server immediately, bypassing the system scheduler. By default, the sync engine will automatically fetch changes from the server for you, and you should not have to call this function. However, you can call this if for some reason you need to ensure all changes have been fetched from the server before proceeding. For example, you might use this in your tests to simulate specific sync scenarios. Fetching changes from the server might result in some events being posted to your delegate via `handleEvent`. For example, you might receive a `CKSyncEngineWillFetchChangesEvent` or `CKSyncEngineWillFetchChangesEvent`. This will not complete until all the relevant events have been handled by your delegate.
-
fetchChangesWithOptionsCompletionHandler
public void fetchChangesWithOptionsCompletionHandler(@NotNull @NotNull CKSyncEngineFetchChangesOptions options, @Nullable @Nullable CKSyncEngine.Block_fetchChangesWithOptionsCompletionHandler completionHandler)Fetches changes from the server with the specified options. See ``fetchChangesWithCompletionHandler:`` for more information.
-
hash_static
public static long hash_static()
-
init
public CKSyncEngine init()
-
initWithConfiguration
public CKSyncEngine initWithConfiguration(@NotNull @NotNull CKSyncEngineConfiguration configuration)
Initializes a `CKSyncEngine` with the given configuration. See properties on ``CKSyncEngineConfiguration`` for more details on all the options.
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
new_objc
public static CKSyncEngine new_objc()
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
sendChangesWithCompletionHandler
public void sendChangesWithCompletionHandler(@Nullable @Nullable CKSyncEngine.Block_sendChangesWithCompletionHandler completionHandler)Sends any pending changes to the server immediately, bypassing the system scheduler. By default, the sync engine will automatically send changes to the server for you, and you should not have to call this function. However, you can call this if for some reason you need to ensure all changes have been sent to the server before proceeding. For example, you might consider using this in your tests to simulate specific sync scenarios. Sending changes to the server might result in some events being posted to your delegate via `handleEvent`. For example, you might receive a `CKSyncEngineWillSendChangesEvent` or `CKSyncEngineDidSendChangesEvent`. This function will not return until all the relevant events have been handled by your delegate.
-
sendChangesWithOptionsCompletionHandler
public void sendChangesWithOptionsCompletionHandler(@NotNull @NotNull CKSyncEngineSendChangesOptions options, @Nullable @Nullable CKSyncEngine.Block_sendChangesWithOptionsCompletionHandler completionHandler)Sends pending changes to the server with the specified options. See discussion in ``sendChangesWithCompletionHandler:`` for more information.
-
setVersion_static
public static void setVersion_static(long aVersion)
-
state
@NotNull public @NotNull CKSyncEngineState state()
A collection of state properties used to efficiently manage sync engine operation. See ``CKSyncEngineState`` for more details.
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
version_static
public static long version_static()
-
-