fetchSharesInPersistentStore:error:
Returns an array that contains all share records in the specified persistent store.
Declaration
- (NSArray<CKShare *> *) fetchSharesInPersistentStore:(NSPersistentStore *) persistentStore error:(NSError **) error;Parameters
- persistentStore:
The persistent store that contains the share records. Use
nilto fetch share records from each of the persistent container’s stores. - error:
On return, an error object that contains information about a problem, or
nilif the method successfully fetches all share records.
Return Value
An array of CKShare objects. If the fetch is successful, but Core Data doesn’t find any share records, the method returns an empty array.
Discussion
Use a fetched share record to manage its participants and their permissions, or assign data directly to it. A share record is a subclass of CKRecord, which means you can store any data you choose in the underlying record to meet your specific needs. For more information, see CKShare.
If you modify a share record, you must save it using the persistUpdatedShare:inPersistentStore:completion: method.
See Also
Sharing Objects
Accepting Share Invitations in a SwiftUI AppacceptShareInvitationsFromMetadata:intoPersistentStore:completion:fetchParticipantsMatchingLookupInfos:intoPersistentStore:completion:fetchSharesMatchingObjectIDs:error:persistUpdatedShare:inPersistentStore:completion:shareManagedObjects:toShare:completion: