public class NSPersistentCloudKitContainer extends NSPersistentContainer
| Modifier and Type | Class and Description |
|---|---|
static interface |
NSPersistentCloudKitContainer.Block_acceptShareInvitationsFromMetadataIntoPersistentStoreCompletion |
static interface |
NSPersistentCloudKitContainer.Block_fetchParticipantsMatchingLookupInfosIntoPersistentStoreCompletion |
static interface |
NSPersistentCloudKitContainer.Block_persistUpdatedShareInPersistentStoreCompletion |
static interface |
NSPersistentCloudKitContainer.Block_purgeObjectsAndRecordsInZoneWithIDInPersistentStoreCompletion |
static interface |
NSPersistentCloudKitContainer.Block_shareManagedObjectsToShareCompletion |
NSPersistentContainer.Block_loadPersistentStoresWithCompletionHandler, NSPersistentContainer.Block_performBackgroundTaskNSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
NSPersistentCloudKitContainer(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptShareInvitationsFromMetadataIntoPersistentStoreCompletion(NSArray<? extends CKShareMetadata> metadata,
NSPersistentStore persistentStore,
NSPersistentCloudKitContainer.Block_acceptShareInvitationsFromMetadataIntoPersistentStoreCompletion completion)
Accept a sharing invitation with the given share metadata.
|
static boolean |
accessInstanceVariablesDirectly() |
static NSPersistentCloudKitContainer |
alloc() |
static NSPersistentCloudKitContainer |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
boolean |
canDeleteRecordForManagedObjectWithID(NSManagedObjectID objectID) |
boolean |
canModifyManagedObjectsInStore(NSPersistentStore store)
canModifyManagedObjectsInStore indicates whether or not a given store is mutable when used with CloudKit.
|
boolean |
canUpdateRecordForManagedObjectWithID(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.
|
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
static java.lang.String |
debugDescription_static() |
static NSURL |
defaultDirectoryURL() |
static java.lang.String |
description_static() |
void |
fetchParticipantsMatchingLookupInfosIntoPersistentStoreCompletion(NSArray<? extends CKUserIdentityLookupInfo> lookupInfos,
NSPersistentStore persistentStore,
NSPersistentCloudKitContainer.Block_fetchParticipantsMatchingLookupInfosIntoPersistentStoreCompletion completion)
Fetches a set of CKShareParticipant objects from the CKDatabase associated with the given persistent store.
|
NSArray<? extends CKShare> |
fetchSharesInPersistentStoreError(NSPersistentStore persistentStore,
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).
|
NSDictionary<? extends NSManagedObjectID,? extends CKShare> |
fetchSharesMatchingObjectIDsError(NSArray<? extends NSManagedObjectID> objectIDs,
org.moe.natj.general.ptr.Ptr<NSError> error)
Returns the associated CKShare object for a given managed object.
|
static long |
hash_static() |
NSPersistentCloudKitContainer |
init() |
boolean |
initializeCloudKitSchemaWithOptionsError(long options,
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.
|
NSPersistentCloudKitContainer |
initWithName(java.lang.String name)
Creates a container using the model named `name` in the main bundle
|
NSPersistentCloudKitContainer |
initWithNameManagedObjectModel(java.lang.String name,
NSManagedObjectModel model) |
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
static NSPersistentCloudKitContainer |
new_objc() |
static NSPersistentCloudKitContainer |
persistentContainerWithName(java.lang.String name) |
static NSPersistentCloudKitContainer |
persistentContainerWithNameManagedObjectModel(java.lang.String name,
NSManagedObjectModel model) |
void |
persistUpdatedShareInPersistentStoreCompletion(CKShare share,
NSPersistentStore persistentStore,
NSPersistentCloudKitContainer.Block_persistUpdatedShareInPersistentStoreCompletion completion)
Saves the given CKShare object to the persistent cloud container's metadata in the provided persistent store.
|
void |
purgeObjectsAndRecordsInZoneWithIDInPersistentStoreCompletion(CKRecordZoneID zoneID,
NSPersistentStore persistentStore,
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).
|
CKRecord |
recordForManagedObjectID(NSManagedObjectID managedObjectID)
These methods provide access to the underlying CKRecord, or CKRecordID, backing a given NSManagedObjectID.
|
CKRecordID |
recordIDForManagedObjectID(NSManagedObjectID managedObjectID) |
NSDictionary<? extends NSManagedObjectID,? extends CKRecordID> |
recordIDsForManagedObjectIDs(NSArray<? extends NSManagedObjectID> managedObjectIDs) |
NSDictionary<? extends NSManagedObjectID,? extends CKRecord> |
recordsForManagedObjectIDs(NSArray<? extends NSManagedObjectID> managedObjectIDs) |
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
static void |
setVersion_static(long aVersion) |
void |
shareManagedObjectsToShareCompletion(NSArray<? extends NSManagedObject> managedObjects,
CKShare share,
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.
|
static org.moe.natj.objc.Class |
superclass_static() |
static long |
version_static() |
loadPersistentStoresWithCompletionHandler, managedObjectModel, name, newBackgroundContext, performBackgroundTask, persistentStoreCoordinator, persistentStoreDescriptions, setPersistentStoreDescriptions, viewContextaccessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, 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, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeyprotected NSPersistentCloudKitContainer(org.moe.natj.general.Pointer peer)
public static boolean accessInstanceVariablesDirectly()
public static NSPersistentCloudKitContainer alloc()
public static NSPersistentCloudKitContainer allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static NSURL defaultDirectoryURL()
public static java.lang.String description_static()
public static long hash_static()
public NSPersistentCloudKitContainer init()
init in class NSPersistentContainerpublic NSPersistentCloudKitContainer initWithName(java.lang.String name)
NSPersistentContainerinitWithName in class NSPersistentContainerpublic NSPersistentCloudKitContainer initWithNameManagedObjectModel(java.lang.String name, NSManagedObjectModel model)
initWithNameManagedObjectModel in class NSPersistentContainerpublic boolean initializeCloudKitSchemaWithOptionsError(long options,
org.moe.natj.general.ptr.Ptr<NSError> error)
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.
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public static NSPersistentCloudKitContainer new_objc()
public static NSPersistentCloudKitContainer persistentContainerWithName(java.lang.String name)
public static NSPersistentCloudKitContainer persistentContainerWithNameManagedObjectModel(java.lang.String name, NSManagedObjectModel model)
public CKRecord recordForManagedObjectID(NSManagedObjectID managedObjectID)
public CKRecordID recordIDForManagedObjectID(NSManagedObjectID managedObjectID)
public NSDictionary<? extends NSManagedObjectID,? extends CKRecordID> recordIDsForManagedObjectIDs(NSArray<? extends NSManagedObjectID> managedObjectIDs)
public NSDictionary<? extends NSManagedObjectID,? extends CKRecord> recordsForManagedObjectIDs(NSArray<? extends NSManagedObjectID> managedObjectIDs)
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public boolean canDeleteRecordForManagedObjectWithID(NSManagedObjectID objectID)
public boolean canModifyManagedObjectsInStore(NSPersistentStore store)
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.
public boolean canUpdateRecordForManagedObjectWithID(NSManagedObjectID objectID)
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
public void acceptShareInvitationsFromMetadataIntoPersistentStoreCompletion(NSArray<? extends CKShareMetadata> metadata, NSPersistentStore persistentStore, NSPersistentCloudKitContainer.Block_acceptShareInvitationsFromMetadataIntoPersistentStoreCompletion completion)
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.
public void fetchParticipantsMatchingLookupInfosIntoPersistentStoreCompletion(NSArray<? extends CKUserIdentityLookupInfo> lookupInfos, NSPersistentStore persistentStore, NSPersistentCloudKitContainer.Block_fetchParticipantsMatchingLookupInfosIntoPersistentStoreCompletion completion)
The completion block will be invoked with the result of the CKFetchShareParticipantsOperation and the retrieved participants (if any).
public NSArray<? extends CKShare> fetchSharesInPersistentStoreError(NSPersistentStore persistentStore, org.moe.natj.general.ptr.Ptr<NSError> error)
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.
public NSDictionary<? extends NSManagedObjectID,? extends CKShare> fetchSharesMatchingObjectIDsError(NSArray<? extends NSManagedObjectID> objectIDs, org.moe.natj.general.ptr.Ptr<NSError> error)
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.
public void persistUpdatedShareInPersistentStoreCompletion(CKShare share, NSPersistentStore persistentStore, NSPersistentCloudKitContainer.Block_persistUpdatedShareInPersistentStoreCompletion completion)
If provided the completion block will be invoked once the share has been saved to the corresponding CKDatabase with the result of the operation.
public void purgeObjectsAndRecordsInZoneWithIDInPersistentStoreCompletion(CKRecordZoneID zoneID, NSPersistentStore persistentStore, NSPersistentCloudKitContainer.Block_purgeObjectsAndRecordsInZoneWithIDInPersistentStoreCompletion completion)
If provided the completion block will be invoked once per store with the result of the purge operation.
public void shareManagedObjectsToShareCompletion(NSArray<? extends NSManagedObject> managedObjects, CKShare share, NSPersistentCloudKitContainer.Block_shareManagedObjectsToShareCompletion completion)
- 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.