---
title: NSCloudSharingServiceDelegate
framework: appkit
role: symbol
role_heading: Protocol
path: appkit/nscloudsharingservicedelegate
---

# NSCloudSharingServiceDelegate

A set of methods for responding to the life cycle events of the cloud-sharing service.

## Declaration

```swift
protocol NSCloudSharingServiceDelegate : NSSharingServiceDelegate
```

## Overview

Overview CloudKit allows a user to share a hierarchy of records with other iCloud users. In macOS, you use NSItemProvider and NSSharingService to facilitate sharing. Register an instance of CKShare with an item provider, and then use a sharing service to present it to the user. You must initialize the service with the cloudSharing service name. If the share is new, the user can configure the share and invite other iCloud users to participate. Otherwise, they can use the service to manage the share’s participants and their permissions. This protocol defines methods that the sharing service calls when it saves changes to a share, or deletes it. The service also asks its delegate to provide the preferred sharing options when creating a new share. Set the service’s delegate property to an object that implements this protocol. Use your implementation to provide any appropriate behavior, such as deleting a share you cache locally when the service deletes it from the server. For more information about CloudKit sharing, see Shared Records.

## Topics

### Managing the Cloud-Sharing Service

- [sharingService(_:didCompleteForItems:error:)](appkit/nscloudsharingservicedelegate/sharingservice(_:didcompleteforitems:error:).md)
- [sharingService(_:didSave:)](appkit/nscloudsharingservicedelegate/sharingservice(_:didsave:).md)
- [sharingService(_:didStopSharing:)](appkit/nscloudsharingservicedelegate/sharingservice(_:didstopsharing:).md)
- [options(for:share:)](appkit/nscloudsharingservicedelegate/options(for:share:).md)
- [NSSharingService.CloudKitOptions](appkit/nssharingservice/cloudkitoptions.md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSharingServiceDelegate](appkit/nssharingservicedelegate.md)

## See Also

### App Services

- [NSSharingService](appkit/nssharingservice.md)
- [NSSharingServicePicker](appkit/nssharingservicepicker.md)
- [NSPreviewRepresentableActivityItem](appkit/nspreviewrepresentableactivityitem.md)
- [NSSharingServicePickerToolbarItem](appkit/nssharingservicepickertoolbaritem.md)
- [NSServicesMenuRequestor](appkit/nsservicesmenurequestor.md)
- [Services Functions](appkit/services-functions.md)
