System capabilities
Most system capabilities live in github.com/tangoui/tango/sys/<package>. APIs generally take a *tango.App or operate on a *tango.Surface. Call them from any goroutine. Native callbacks run on the main thread. Unsupported operations return ErrUnsupported, and operations that need a running app can return tango.ErrNotRunning after it exits. On Android, use a separate goroutine for operations that wait for the user, such as dialogs, sharing or permission requests. Threading
Desktop backends are verified on macOS hardware and covered by CI smoke tests on Windows and Linux. Mobile capabilities are experimental. iOS has run in simulators and on one iPhone 12 Pro, and Android has run in emulators. Platform support
Desktop
| Package | Purpose | JS module |
|---|---|---|
| clipboard | Text, PNG images and file lists | Clipboard |
| dialog | Message, open and save dialogs | Dialog |
| notify | System notifications and click handling | Notify |
| hotkey | Global and in-page shortcuts | Hotkey |
| screen | Displays, primary display and display at a point | Screens |
| theme | Light/dark mode, accent color and page synchronization | Theme |
| shell | Open URLs and files or reveal them in the file manager | Shell |
| appctl | Visibility, badge, progress, attention and Dock icon | App |
| autostart | Start at login | |
| env | OS, architecture, build and WebView version | App.info |
| recent | Recently opened documents | |
| single | Single instance and argument forwarding | App.onSecondInstance |
| windowstate | Restore window geometry | |
| power | Power status and idle-sleep prevention, with sleep/wake callbacks on desktop | |
| menu | App, window and context menus | Menu |
| tray | Tray icons |
JS runtime capabilities and permissions
Mobile
| Package | Purpose | tan.json permission |
|---|---|---|
| permission | Check and request runtime permissions | As requested |
| share | Native share sheet, also available on macOS | |
| haptics | Haptic feedback | |
| safearea | Safe-area insets and CSS variables | |
| orientation | Read and lock the screen orientation | |
| biometric | Face ID, Touch ID or BiometricPrompt. Also supports macOS | biometric |
| securestore | Small secrets in Keychain or Keystore. Also supports macOS | |
| media | Pick photos or videos, or take a photo | camera for capture |
| location | One-shot and continuous location | location |
| push | APNs or FCM push notifications | notifications |
Other capabilities include mobile background tasks (sys/background), device settings (sys/device), widgets (sys/widget) and in-app purchases (sys/purchase), as well as network status (sys/network), tray flyouts (sys/flyout), launch shortcuts (sys/jumplist), printing (sys/print) and pseudo-terminals (sys/pty). Go API reference
Services
The service package binds Go values to application startup and shutdown, with optional IPC bindings. service/paths finds standard app directories, service/kv provides a concurrent key-value store, service/log provides rotating logs, and service/fileserver exposes files under a resource prefix. service/updater implements signed desktop updates. Packaging, signing & updates