Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSSharingServiceDelegateMBS class.
NSSharingServiceDelegateMBS.didCompleteForItems(service as NSSharingServiceMBS, items as NSSharingServiceItemsMBS, error as NSErrorMBS)
Function:
Sharing did complete.
Notes: When an NSSharingServiceNameCloudSharing sharing service is dismissed it will invoke this method on the delegate, with an error if there was any. If the delegate implements this method, NSSharingServiceNameCloudSharing will not send didFailToShareItems or didShareItems events.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Social | MBS MacFrameworks Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: When an NSSharingServiceNameCloudSharing sharing service is dismissed it will invoke this method on the delegate, with an error if there was any. If the delegate implements this method, NSSharingServiceNameCloudSharing will not send didFailToShareItems or didShareItems events.
NSSharingServiceDelegateMBS.didFailToShareItems(service as NSSharingServiceMBS, items as NSSharingServiceItemsMBS, error as NSErrorMBS)
Function:
Invoked when the sharing service encountered an error when sharing items.
Notes:
sharingService: The sharing service.
items: The items being shared.
error: The error that was encountered when trying to share the item. If the error is NSUserCancelledError, the user simply cancelled the error.
Available in OS X v10.8 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Social | MBS MacFrameworks Plugin | 12.3 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
sharingService: The sharing service.
items: The items being shared.
error: The error that was encountered when trying to share the item. If the error is NSUserCancelledError, the user simply cancelled the error.
Available in OS X v10.8 and later.
Some examples using this event:
NSSharingServiceDelegateMBS.didSaveShare(service as NSSharingServiceMBS, share as Variant)
Function:
Cloud sharing did save.
Notes: When an NSSharingServiceNameCloudSharing sharing service successfully saves modifications to the CKShare, it will invoke this method on the delegate with the last-known state of the CKShareMBS on the server.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Social | MBS MacFrameworks Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: When an NSSharingServiceNameCloudSharing sharing service successfully saves modifications to the CKShare, it will invoke this method on the delegate with the last-known state of the CKShareMBS on the server.
NSSharingServiceDelegateMBS.didShareItems(service as NSSharingServiceMBS, items as NSSharingServiceItemsMBS)
Function:
Invoked when the sharing service has finished sharing the items.
Notes:
sharingService: The sharing service.
items: The items being shared.
Available in OS X v10.8 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Social | MBS MacFrameworks Plugin | 12.3 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
sharingService: The sharing service.
items: The items being shared.
Available in OS X v10.8 and later.
Some examples using this event:
NSSharingServiceDelegateMBS.didStopSharing(service as NSSharingServiceMBS, share as Variant)
Function:
Cloud sharing did stop.
Notes: When an NSSharingServiceNameCloudSharing sharing service stops sharing it will delete the CKShare from the server, then invoke this method on the delegate with the last-known state of the CKShareMBS.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Social | MBS MacFrameworks Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: When an NSSharingServiceNameCloudSharing sharing service stops sharing it will delete the CKShare from the server, then invoke this method on the delegate with the last-known state of the CKShareMBS.
NSSharingServiceDelegateMBS.optionsForSharingService(service as NSSharingServiceMBS, provider as Variant) as Integer
Function:
Queries what options are allowed for the share.
Notes: The options returned by this method describe how the user is allowed to configure the share: whether the share is public or private, and whether participants have read-only or read/write permissions. If this method is not implemented, NSCloudKitSharingServiceStandard is assumed.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Social | MBS MacFrameworks Plugin | 21.5 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes: The options returned by this method describe how the user is allowed to configure the share: whether the share is public or private, and whether participants have read-only or read/write permissions. If this method is not implemented, NSCloudKitSharingServiceStandard is assumed.
NSSharingServiceDelegateMBS.sourceFrameOnScreenForShareItem(service as NSSharingServiceMBS, item as Variant) as NSRectMBS
Function:
Invoked when the sharing service is performed and the sharing window is displayed, to present a transition between the original items and the sharing window.
Notes:
sharingService: The sharing service.
item: The item being shared.
Return the rectangle, in screen coordinates, to display the transition.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Social | MBS MacFrameworks Plugin | 12.3 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
sharingService: The sharing service.
item: The item being shared.
Return the rectangle, in screen coordinates, to display the transition.
NSSharingServiceDelegateMBS.sourceWindowForShareItems(service as NSSharingServiceMBS, items as NSSharingServiceItemsMBS, scope as Integer) as NSWindowMBS
Function:
Returns the window that contained the share items.
Notes:
sharingService: The sharing service.
items: The items being shared.
sharingContentScope: The sharing content scope. The sharing scope can be modified from the default value of NSSharingContentScopeItem by setting a different value in the out parameter sharingContentScope.
Return the window of the shared items.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Social | MBS MacFrameworks Plugin | 12.3 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
sharingService: The sharing service.
items: The items being shared.
sharingContentScope: The sharing content scope. The sharing scope can be modified from the default value of NSSharingContentScopeItem by setting a different value in the out parameter sharingContentScope.
Return the window of the shared items.
NSSharingServiceDelegateMBS.transitionImageForShareItem(service as NSSharingServiceMBS, item as Variant, contentRect as NSRectMBS) as NSImageMBS
Function:
Invoked to allow returning a custom transition image when sharing an item.
Notes:
sharingService: The sharing service.
item: The shared item.
contentRect: The content rectangle is the frame of the actual content inside the transition image, excluding all decorations. For example, if the transition image is a QuickLook thumbnail, the value would be QLThumbnailGetContentRect.
Return the image to display for the sharing transition. Its size should exactly match that of the original image.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Social | MBS MacFrameworks Plugin | 12.3 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
sharingService: The sharing service.
item: The shared item.
contentRect: The content rectangle is the frame of the actual content inside the transition image, excluding all decorations. For example, if the transition image is a QuickLook thumbnail, the value would be QLThumbnailGetContentRect.
Return the image to display for the sharing transition. Its size should exactly match that of the original image.
NSSharingServiceDelegateMBS.willShareItems(service as NSSharingServiceMBS, items as NSSharingServiceItemsMBS)
Function:
Invoked when the sharing service will share the specified items.
Notes:
sharingService: The sharing service.
items: The items being shared.
Available in OS X v10.8 and later.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
event | Social | MBS MacFrameworks Plugin | 12.3 | ✅ Yes | ❌ No | ❌ No | ❌ No |
Notes:
sharingService: The sharing service.
items: The items being shared.
Available in OS X v10.8 and later.
Some examples using this event:
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
