# Packages
No description provided by the author
# README
share
Opens the share dialog to share texts and websites.
Usage
Freestanding
share.NewShare
:- Creates a instance of Share struct, given the config.
share.Configure
:- Updates the current Share with the given config.
share.Text
:- Shares text using the native share dialog.
share.Website
:- Shares a website using the native share dialog.
Gio
Non-Plugin:
If you want to use it without plugin, read the Freestanding instructions. We provide some helper functions, such as NewConfigFromViewEvent and such.
Plugin:
Operations:
Operations must be added with .Add(gtx.Ops)
method. The operation will be executed at the end of the frame.
gioshare.TextOp
:- Shares text using the native share dialog.
gioshare.WebsiteOp
:- Shares a website using the native share dialog.
Events:
Events are response sent using the Tag
and should be handled with gtx.Events()
.
gioshare.ErrorEvent
:- Sent to
Tag
when it's not possible to share.
- Sent to
Features
OS | Windows | Android | MacOS | iOS | WebAssembly |
---|---|---|---|---|---|
Share Text | ✔ | ✔ | ✔ | ✔ | ✔ |
Share Website | ✔ | ✔ | ✔ | ✔ | ✔ |
Share Image | ❌ | ❌ | ❌ | ❌ | ❌ |
-- | -- | -- | -- | -- | -- |
API | DataTransfer | Intent.ACTION_SEND | NSSharingServicePicker | UIActivityViewController | Web Share API |
- ❌ = Not supported.
- ✔ = Supported.
Requirements
- Windows:
- End-Users: must have Windows 10+.
- Developers: must have Golang 1.18+ installed (no CGO required).
- WebAssembly:
- End-Users: must have WebAssembly enabled browser (usually Safari 13+, Chrome 70+).
- Developers: must have Golang 1.18+ installed (no CGO required).
- macOS:
- End-Users: must have macOS 12+.
- Developers: must have macOS device with Golang, Xcode, and CLang installed.
- iOS:
- End-Users: must have macOS 13+.
- Developers: must have macOS device with Golang, Xcode, and CLang installed.
- Android:
- End-Users: must have Android 6+.
- Developers: must have Golang 1.18+, OpenJDK 1.8, Android NDK, Android SDK 31 installed (here for more information).