How do I add the Share submenu in a Mac app? An example is Safari > File > Share. I poked at the Apple SharingServices sample code, but it does not include a working menu item.
Right now I have a button that displays a picker of available sharing services when tapped:
NSMutableArray *shareItems = [NSMutableArray arrayWithObject:[self.noteSynopsisView string]];
NSSharingServicePicker *sharingServicePicker = [[NSSharingServicePicker alloc] initWithItems:shareItems];
sharingServicePicker.delegate = self;
[sharingServicePicker showRelativeToRect:[self.shareButton bounds] ofView:self.shareButton preferredEdge:NSMaxYEdge];
I've also defined a Share submenu item under the File menu for my MainWindow.xib.
As I understand it, the NSSharingService list is being generated on the fly. So I can't really predefine the services to the menu item I have created in Interface Builder.
Thanks for your help.