Documentation
¶
Overview ¶
Package share opens the system share sheet with text, a URL and/or files: UIActivityViewController on iOS, an ACTION_SEND chooser on Android, NSSharingServicePicker on macOS.
err := share.Share(a, share.Options{Text: "Look at this", URL: "https://example.com"})
if errors.Is(err, share.ErrCanceled) { ... }
Share blocks until the sheet is dismissed (iOS, macOS) or shown (Android, which does not report what the user did). It returns ErrUnsupported where the backend has no share sheet and tango.ErrNotRunning after the app quit. On Android call it from a goroutine, not from a main-thread callback (see docs/mobile.md).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnsupported = platform.ErrUnsupported ErrCanceled = platform.ErrCanceled )