Class CKSyncEngineConfiguration

  • All Implemented Interfaces:
    NSObject

    public class CKSyncEngineConfiguration
    extends NSObject
    API-Since: 17.0
    • Constructor Detail

      • CKSyncEngineConfiguration

        protected CKSyncEngineConfiguration​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • automaticallySync

        public boolean automaticallySync()
        Whether or not the sync engine should automatically sync on your behalf. If true, then the sync engine will automatically sync using the system scheduler. This is the default value. When you add pending changes to the state, the sync engine will automatically schedule a sync task to send changes. When it receives a notification about new changes on the server, it will automatically schedule a sync task to fetch changes. It will also automatically re-schedule sync tasks for retryable errors such as network failures or server throttles. If `automaticallySync` is off, then the sync engine will not perform any operations unless you tell it to do so via `fetchChanges` or `sendChanges`. Most applications likely want to enable automatic syncing during normal use. However, you might want to disable it if you have specific requirements for when you want to sync. For example, if you want to sync only once per day, you can turn off automatic sync and manually call `fetchChanges` and `sendChanges` once per day. You might also disable automatic sync when writing automated tests for your integration with `CKSyncEngine`. This way, you can have fine grained control over exactly when the sync engine fetches or sends changes. This allows you to simulate edge cases and deterministically test your logic around scenarios like conflict resolution and error handling.
      • 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 for this sync engine to sync with. You can have multiple instances of `CKSyncEngine` in the same process, each targeting a different database. For example, you might have one for your private database and one for your shared database. It's also technically possible to have multiple instances of `CKSyncEngine` for the same `CKDatabase`. This isn't recommended for production code, but it can be helpful for testing your `CKSyncEngine` integration. For example, you might make multiple `CKSyncEngine` instances to simulate multiple devices syncing back and forth.
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • delegate

        @Nullable
        public @Nullable CKSyncEngineDelegate delegate()
        Your implementation of `CKSyncEngineDelegate`.
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • 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)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setAutomaticallySync

        public void setAutomaticallySync​(boolean value)
        Whether or not the sync engine should automatically sync on your behalf. If true, then the sync engine will automatically sync using the system scheduler. This is the default value. When you add pending changes to the state, the sync engine will automatically schedule a sync task to send changes. When it receives a notification about new changes on the server, it will automatically schedule a sync task to fetch changes. It will also automatically re-schedule sync tasks for retryable errors such as network failures or server throttles. If `automaticallySync` is off, then the sync engine will not perform any operations unless you tell it to do so via `fetchChanges` or `sendChanges`. Most applications likely want to enable automatic syncing during normal use. However, you might want to disable it if you have specific requirements for when you want to sync. For example, if you want to sync only once per day, you can turn off automatic sync and manually call `fetchChanges` and `sendChanges` once per day. You might also disable automatic sync when writing automated tests for your integration with `CKSyncEngine`. This way, you can have fine grained control over exactly when the sync engine fetches or sends changes. This allows you to simulate edge cases and deterministically test your logic around scenarios like conflict resolution and error handling.
      • setDatabase

        public void setDatabase​(@NotNull
                                @NotNull CKDatabase value)
        The database for this sync engine to sync with. You can have multiple instances of `CKSyncEngine` in the same process, each targeting a different database. For example, you might have one for your private database and one for your shared database. It's also technically possible to have multiple instances of `CKSyncEngine` for the same `CKDatabase`. This isn't recommended for production code, but it can be helpful for testing your `CKSyncEngine` integration. For example, you might make multiple `CKSyncEngine` instances to simulate multiple devices syncing back and forth.
      • setDelegate_unsafe

        public void setDelegate_unsafe​(@Nullable
                                       @Nullable CKSyncEngineDelegate value)
        Your implementation of `CKSyncEngineDelegate`.
      • setDelegate

        public void setDelegate​(@Nullable
                                @Nullable CKSyncEngineDelegate value)
        Your implementation of `CKSyncEngineDelegate`.
      • setStateSerialization

        public void setStateSerialization​(@Nullable
                                          @Nullable CKSyncEngineStateSerialization value)
        The state serialization you last received in a `CKSyncEngineStateUpdateEvent`. If this is the first time ever initializing your `CKSyncEngine`, you can provide `nil`.
      • setSubscriptionID

        public void setSubscriptionID​(@Nullable
                                      @Nullable java.lang.String value)
        An optional override for the sync engine's default database subscription ID. Use this for backward compatibility with a previous CloudKit sync implementation. By default, `CKSyncEngine` will create its own `CKDatabaseSubscription` with its own subscription ID. If you're migrating to `CKSyncEngine` from a custom CloudKit sync implementation, you can specify your previous subscription ID here. This allows your `CKSyncEngine` integration to be backward compatible with previous versions of your app. >Note: `CKSyncEngine` will automatically attempt to discover any previous database subscriptions, but you can be more explicit by giving the subscription ID through this configuration option.
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • stateSerialization

        @Nullable
        public @Nullable CKSyncEngineStateSerialization stateSerialization()
        The state serialization you last received in a `CKSyncEngineStateUpdateEvent`. If this is the first time ever initializing your `CKSyncEngine`, you can provide `nil`.
      • subscriptionID

        @Nullable
        public @Nullable java.lang.String subscriptionID()
        An optional override for the sync engine's default database subscription ID. Use this for backward compatibility with a previous CloudKit sync implementation. By default, `CKSyncEngine` will create its own `CKDatabaseSubscription` with its own subscription ID. If you're migrating to `CKSyncEngine` from a custom CloudKit sync implementation, you can specify your previous subscription ID here. This allows your `CKSyncEngine` integration to be backward compatible with previous versions of your app. >Note: `CKSyncEngine` will automatically attempt to discover any previous database subscriptions, but you can be more explicit by giving the subscription ID through this configuration option.
      • 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()