public class CKShare extends CKRecord implements NSSecureCoding, NSCopying
Like CKRecords, CKShares can store arbitrary key-value pairs. They are modified and fetched in the same manner. A share, its root record, and its root record's children records will only appear in a participant's CKFetchRecordChangesOperation's results after the share has been accepted by that participant. Clients have access to the share (and optionally the root record) before accepting a share, via the CKShareMetadata object. Note that in order to access a root record before accepting a share, you must run a CKFetchShareMetadataOperation requesting the root record. A CKShare will appear in a CKFetchRecordChangesOperation's results set whenever the participant list is updated. For that reason, you shouldn't place heavy key-value pairs in it.
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
CKShare(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
_supportsSecureCoding()
This property must return YES on all classes that allow secure coding.
|
static boolean |
accessInstanceVariablesDirectly() |
void |
addParticipant(CKShareParticipant participant)
If a participant with a matching userIdentity already exists, then that existing participant's properties will be updated; no new participant will be added.
|
static CKShare |
alloc() |
static CKShare |
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) |
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
java.lang.Object |
copyWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
CKShareParticipant |
currentUserParticipant() |
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
void |
encodeWithCoder(NSCoder coder) |
static long |
hash_static() |
CKShare |
init() |
CKShare |
initWithCoder(NSCoder aDecoder)
NS_DESIGNATED_INITIALIZER
|
CKShare |
initWithRecordType(java.lang.String recordType)
This creates the record in the default zone.
|
CKShare |
initWithRecordTypeRecordID(java.lang.String recordType,
CKRecordID recordID) |
CKShare |
initWithRecordTypeZoneID(java.lang.String recordType,
CKRecordZoneID zoneID) |
CKShare |
initWithRecordZoneID(CKRecordZoneID recordZoneID)
Creates a zone-wide @c CKShare.
|
CKShare |
initWithRootRecord(CKRecord rootRecord)
When saving a newly created CKShare, you must save the share and its rootRecord in the same CKModifyRecordsOperation batch.
|
CKShare |
initWithRootRecordShareID(CKRecord rootRecord,
CKRecordID shareID) |
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 CKShare |
new_objc() |
CKShareParticipant |
owner()
Convenience methods for fetching special users from the participant array
|
NSArray<? extends CKShareParticipant> |
participants()
All participants on the share that the current user has permissions to see.
|
long |
publicPermission()
Defines what permission a user has when not explicitly added to the share.
|
void |
removeParticipant(CKShareParticipant participant) |
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setPublicPermission(long value)
Defines what permission a user has when not explicitly added to the share.
|
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
static boolean |
supportsSecureCoding() |
NSURL |
URL()
A URL that can be used to invite participants to this share.
|
static long |
version_static() |
allKeys, allTokens, changedKeys, creationDate, creatorUserRecordID, encodeSystemFieldsWithCoder, encryptedValues, lastModifiedUserRecordID, modificationDate, objectForKey, objectForKeyedSubscript, parent, recordChangeTag, recordID, recordType, setObjectForKey, setObjectForKeyedSubscript, setParent, setParentReferenceFromRecord, setParentReferenceFromRecordID, shareaccessibilityActivate, 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, willChangeValuesAtIndexesForKeypublic static boolean accessInstanceVariablesDirectly()
public static CKShare alloc()
public static CKShare 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 java.lang.String description_static()
public static long hash_static()
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 CKShare new_objc()
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 boolean supportsSecureCoding()
public static long version_static()
public NSURL URL()
Only available after share record has been saved to the server. This url is stable, and is tied to the rootRecord. That is, if you share a rootRecord, delete the share, and re-share the same rootRecord via a newly created share, that newly created share's url will be identical to the prior share's url
public void addParticipant(CKShareParticipant participant)
CKShareParticipantRolepublic CKShareParticipant currentUserParticipant()
public CKShare initWithCoder(NSCoder aDecoder)
NSCodinginitWithCoder in interface NSCodinginitWithCoder in class CKRecordpublic CKShare initWithRecordType(java.lang.String recordType)
CKRecordinitWithRecordType in class CKRecordpublic CKShare initWithRecordTypeRecordID(java.lang.String recordType, CKRecordID recordID)
initWithRecordTypeRecordID in class CKRecordpublic CKShare initWithRecordTypeZoneID(java.lang.String recordType, CKRecordZoneID zoneID)
initWithRecordTypeZoneID in class CKRecordpublic CKShare initWithRootRecord(CKRecord rootRecord)
public CKShare initWithRootRecordShareID(CKRecord rootRecord, CKRecordID shareID)
public CKShareParticipant owner()
public NSArray<? extends CKShareParticipant> participants()
At the minimum that will include the owner and the current user.
public long publicPermission()
Shares with @c publicPermission more permissive than @c CKShareParticipantPermissionNone can be joined by any user with access to the share's shareURL. By default, public permission is @c CKShareParticipantPermissionNone. Changing the public permission to @c CKShareParticipantPermissionReadOnly or @c CKShareParticipantPermissionReadWrite will result in all pending participants being removed. Already-accepted participants will remain on the share. Changing the public permission to @c CKShareParticipantPermissionNone will result in all participants being removed from the share. You may subsequently choose to call @c addParticipant: before saving the share, those participants will be added to the share.
public void removeParticipant(CKShareParticipant participant)
public void setPublicPermission(long value)
Shares with @c publicPermission more permissive than @c CKShareParticipantPermissionNone can be joined by any user with access to the share's shareURL. By default, public permission is @c CKShareParticipantPermissionNone. Changing the public permission to @c CKShareParticipantPermissionReadOnly or @c CKShareParticipantPermissionReadWrite will result in all pending participants being removed. Already-accepted participants will remain on the share. Changing the public permission to @c CKShareParticipantPermissionNone will result in all participants being removed from the share. You may subsequently choose to call @c addParticipant: before saving the share, those participants will be added to the share.
public boolean _supportsSecureCoding()
NSSecureCoding_supportsSecureCoding in interface NSSecureCoding_supportsSecureCoding in class CKRecordpublic void encodeWithCoder(NSCoder coder)
encodeWithCoder in interface NSCodingencodeWithCoder in class CKRecordpublic java.lang.Object copyWithZone(org.moe.natj.general.ptr.VoidPtr zone)
copyWithZone in interface NSCopyingcopyWithZone in class CKRecordpublic CKShare initWithRecordZoneID(CKRecordZoneID recordZoneID)
All records in this zone will appear in a participant's @c CKFetchRecordZoneChangesOperation results in the shared database after the share has been accepted by the participant.
Since these shares do not have an associated root record, @c shouldFetchRootRecord and @c rootRecordDesiredKeys are always ignored when running a @c CKFetchShareMetadataOperation on a zone-wide share URL. Additionally, @c rootRecordID on the resulting @c CKShareMetadata is always absent.