Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
Shares items with other services.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
SharingService | 10.3 | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |
Parameter | Description | Example |
---|---|---|
ServiceName | The service name to use. Pass empty text to show menu at mouse cursor and let the user choose. |
"" |
Item... | Pass one parameter for each item. An item may be a container with an image, a list of URLs, a list of native file paths or styled text. |
"Hello World" |
Returns OK or error.
Name | Title |
com.apple.messages.ShareExtension | Messages |
com.apple.Notes.SharingExtension | Notes |
com.apple.reminders.sharingextension | Reminders |
com.apple.share.AirDrop.send | AirDrop |
com.apple.share.Mail.compose | |
com.apple.share.System.add-to-iphoto | Add to Photos |
Share items:
# for the case you use email, we may predefine the subject & recipients we suggest
Set Variable [ $r ; Value: MBS("SharingService.SetEmailSubject"; Sharing Services::Email Subject) ]
Set Variable [ $r ; Value: MBS("SharingService.SetEmailRecipients"; Sharing Services::Email Recipients) ]
#
# set trigger
Set Variable [ $r ; Value: MBS("SharingService.SetTrigger"; Get(FileName); "Trigger") ]
#
# share them
Set Variable [ $r ; Value: MBS("SharingService.ShareItems"; Sharing Services::ServiceName;
// pass as many parameter with items. Empty ones will be ignore.
Sharing Services::URLs;
Sharing Services::Text;
Sharing Services::Image;
Sharing Services::File Paths) ]
Set Field [ Sharing Services::Result ; $r ]
Send text to Apple Mail:
MBS( "SharingService.ShareItems"; "com.apple.share.Mail.compose"; "Hello World" )
Send two URLs and some text:
MBS( "SharingService.ShareItems"; ""; "https://www.monkeybreadsoftware.com/filemaker/¶https://www.mbsplugins.eu/"; "Check the websites" )
This function checks for a license.
Created 27th June 2020, last changed 25th January 2024