persistUpdatedShare:inPersistentStore:completion:
Saves the share record and schedules it for export to iCloud.
Declaration
- (void) persistUpdatedShare:(CKShare *) share inPersistentStore:(NSPersistentStore *) persistentStore completion:(void (^)(CKShare *persistedShare, NSError *persistedShareError)) completion;Parameters
- share:
The share record to save.
- persistentStore:
The persistent store that provides the database scope and the CloudKit container’s identifier. For more information, see Nspersistentcloudkitcontaineroptions.
- completion:
The handler to invoke after the export finishes.
Discussion
The completion callback returns no value and takes the following parameters:
The saved share record, or
nilif the save fails.An error object that contains information about a problem, or
nilif the share record saves successfully.
Core Data saves the share to the persistent store before this method returns, but doesn’t invoke the completion handler until after the export finishes.