Xojo - some pieces 4u
macOS: NSSharingService (Email, Messages, AirDrop) 0.5.1
- Read the Description
Download and try it yourself
Do you like it? Does it help you? Has it saved you time and money?
You're welcome - it's free... If you want to say thanks I appreciate a message or a small donation.
An example Xojo project to show how to use NSSharingService in Xojo-built Applications (macOS, 64Bit only).
The following services are implemented in the example project:
- Compose Email (Subject, Content, Attachments)
- Compose Message (Content/Text, File/Attachments)
- Send via AirDrop (Files/Attachments)
How to use with your Xojo-built .app?
1. copy the Module 'modNSSharingService' to your project.
2. you can then use the provided convenience methods: .ComposeEmail, .ComposeMessage, .SendViaAirDrop
These methods return true if the sharing service can be invoked, false if the service is not available.
The Sharing Service will run asynchrously (e.g. when not called to show modally within a window). That's why you can pass a ResultCallbackDelegate, which will be invoked and reported back with the result later (e.g.: successfully shared, cancelled by user, ...).
back to overview
contact: Juerg Otter