Class NSPersistentCloudKitContainer

    • Constructor Detail

      • NSPersistentCloudKitContainer

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • 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()
      • debugDescription_static

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

        @NotNull
        public static @NotNull NSURL defaultDirectoryURL()
      • description_static

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

        public static long hash_static()
      • initializeCloudKitSchemaWithOptionsError

        public boolean initializeCloudKitSchemaWithOptionsError​(long options,
                                                                @Nullable
                                                                @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        This method creates a set of representative CKRecord instances for all stores in the container that use Core Data with CloudKit and uploads them to CloudKit. These records are "fully saturated" in that they have a representative value set for every field Core Data might serialize for the given managed object model. After records are successfully uploaded the schema will be visible in the CloudKit dashboard and the representative records will be deleted. This method returns YES if these operations succeed, or NO and the underlying error if they fail. Note: This method also validates the managed object model in use for a store, so a validation error may be returned if the model is not valid for use with CloudKit.
      • 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)
      • persistentContainerWithName

        public static NSPersistentCloudKitContainer persistentContainerWithName​(@NotNull
                                                                                @NotNull java.lang.String name)
      • recordForManagedObjectID

        @Nullable
        public @Nullable CKRecord recordForManagedObjectID​(@NotNull
                                                           @NotNull NSManagedObjectID managedObjectID)
      • recordIDForManagedObjectID

        @Nullable
        public @Nullable CKRecordID recordIDForManagedObjectID​(@NotNull
                                                               @NotNull NSManagedObjectID managedObjectID)
      • resolveClassMethod

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

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

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • version_static

        public static long version_static()
      • canDeleteRecordForManagedObjectWithID

        public boolean canDeleteRecordForManagedObjectWithID​(@NotNull
                                                             @NotNull NSManagedObjectID objectID)
        API-Since: 14.0
      • canModifyManagedObjectsInStore

        public boolean canModifyManagedObjectsInStore​(@NotNull
                                                      @NotNull NSPersistentStore store)
        canModifyManagedObjectsInStore indicates whether or not a given store is mutable when used with CloudKit. This method return YES if the current user has write permissions to the CKDatabase that backs the store. For example: - When using the Public database, devices without an iCloud account can read data but not write any. - When using the Private database, this method always returns YES, even if no iCloud account is present on the device. API-Since: 14.0
      • canUpdateRecordForManagedObjectWithID

        public boolean canUpdateRecordForManagedObjectWithID​(@NotNull
                                                             @NotNull NSManagedObjectID objectID)
        canUpdateRecordForManagedObjectWithID / canDeleteRecordForManagedObjectWithID indicate whether or not a given object assigned the provided NSManagedObjectID is mutable with respect to the instance of CKRecord that backs it with CloudKit. In order for canUpdateRecordForManagedObjectWithID / canDeleteRecordForManagedObjectWithID to return YES, -[NSPersistentCloudKitContainer canModifyManagedObjectsInStore] must also be YES. Returns YES if any of the following conditions are true: - The provided objectID is a temporary objectID - The provided objectID is assigned to a store not backed by a CKDatabase - The provided objectID is assigned to a store backed by the Private CKDatabase - The provided objectID is assigned to a store backed by the Public CKDatabase AND one of the following conditions is met: - The object has yet to be uploaded to CloudKit (it will be assigned to the current user) - The object has already been uploaded to CloudKit and is owned (indicated by CKRecord.creatorUserRecordID) by the current user API-Since: 14.0
      • acceptShareInvitationsFromMetadataIntoPersistentStoreCompletion

        public void acceptShareInvitationsFromMetadataIntoPersistentStoreCompletion​(@NotNull
                                                                                    @NotNull NSArray<? extends CKShareMetadata> metadata,
                                                                                    @NotNull
                                                                                    @NotNull NSPersistentStore persistentStore,
                                                                                    @Nullable
                                                                                    @Nullable NSPersistentCloudKitContainer.Block_acceptShareInvitationsFromMetadataIntoPersistentStoreCompletion completion)
        Accept a sharing invitation with the given share metadata. The provided persistent store must be configured to use the Shared database scope. If provided the completion block will be invoked once all operations required to accept the share invitations have finished with the resulting CKShareMetadata objects or with an error if one occurs. API-Since: 15.0
      • fetchSharesInPersistentStoreError

        @Nullable
        public @Nullable NSArray<? extends CKShare> fetchSharesInPersistentStoreError​(@Nullable
                                                                                      @Nullable NSPersistentStore persistentStore,
                                                                                      @Nullable
                                                                                      @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Fetches all known CKShare records in the given persistent store (or all persistent stores in the persistent cloud container if none is set). This method does not to any network work to attempt to discover additional zones or shares in the CKDatabase that is associated with the persistent store. API-Since: 15.0
      • fetchSharesMatchingObjectIDsError

        @Nullable
        public @Nullable NSDictionary<? extends NSManagedObjectID,​? extends CKShare> fetchSharesMatchingObjectIDsError​(@NotNull
                                                                                                                             @NotNull NSArray<? extends NSManagedObjectID> objectIDs,
                                                                                                                             @Nullable
                                                                                                                             @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Returns the associated CKShare object for a given managed object. If the object's backing CKRecord resides in a CKRecordZone that is currently shared a CKShare will be returned. If the object is not associated with a shared record zone, or the object has not yet been exported to CloudKit (and it's zone is not known), it will not have an entry in the resulting dictionary. API-Since: 15.0
      • persistUpdatedShareInPersistentStoreCompletion

        public void persistUpdatedShareInPersistentStoreCompletion​(@NotNull
                                                                   @NotNull CKShare share,
                                                                   @NotNull
                                                                   @NotNull NSPersistentStore persistentStore,
                                                                   @Nullable
                                                                   @Nullable NSPersistentCloudKitContainer.Block_persistUpdatedShareInPersistentStoreCompletion completion)
        Saves the given CKShare object to the persistent cloud container's metadata in the provided persistent store. If provided the completion block will be invoked once the share has been saved to the corresponding CKDatabase with the result of the operation. API-Since: 15.0
      • purgeObjectsAndRecordsInZoneWithIDInPersistentStoreCompletion

        public void purgeObjectsAndRecordsInZoneWithIDInPersistentStoreCompletion​(@NotNull
                                                                                  @NotNull CKRecordZoneID zoneID,
                                                                                  @Nullable
                                                                                  @Nullable NSPersistentStore persistentStore,
                                                                                  @Nullable
                                                                                  @Nullable NSPersistentCloudKitContainer.Block_purgeObjectsAndRecordsInZoneWithIDInPersistentStoreCompletion completion)
        Purges a zone from the CKDatabase associated with the given persistent store (or all active CKDatabases in the persistent cloud container's stores). If provided the completion block will be invoked once per store with the result of the purge operation. API-Since: 15.0
      • shareManagedObjectsToShareCompletion

        public void shareManagedObjectsToShareCompletion​(@NotNull
                                                         @NotNull NSArray<? extends NSManagedObject> managedObjects,
                                                         @Nullable
                                                         @Nullable CKShare share,
                                                         @NotNull
                                                         @NotNull NSPersistentCloudKitContainer.Block_shareManagedObjectsToShareCompletion completion)
        Use this method to share a set of managed objects to either a new CKShare or an existing one if specified as the 'share' parameter. - managedObjects - the set of objects to be shared. A deep traversal will be performed among the objects and any related objects will also be shared. - share - The existing share in which to share the objects, or nil if a new one should be created for them - completion - A completion block when the share is created and the objects are assigned to it (not necessarily when the objects have been exported to the share) This method will fail if: 1. Any of the objects in 'managedObjects' or those discovered by traversal are already shared 2. Any of the objects in 'managedObjects' are from persistent stores which do not support sharing (for example those using CKDatabaseScopePublic) 3. The current device conditions do not support sharing, for example if there is no CloudKit account on the device, or if NSPersistentCloudKitContainer has failed to initialize. The completion block is meant to be used directly with UICloudSharingController's preparation block completion handler. API-Since: 15.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.