Help us shape the future of Go! Take the 2026 Go Developer Survey

darwin

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package darwin calls the macOS libraries actnowkit needs (libSystem's notify(3), Foundation/AppKit through the Objective-C runtime, the Security framework) with purego: no cgo.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppURLs

func AppURLs(bundleID string) ([]string, error)

AppURLs asks LaunchServices where apps with this bundle id are installed (NSWorkspace URLsForApplicationsWithBundleIdentifier:, macOS 12+).

func NotifyCancel

func NotifyCancel(tokens map[int32]string)

NotifyCancel cancels registrations; the descriptor closes with the last.

func NotifyPost

func NotifyPost(name string) error

NotifyPost posts a Darwin notification.

func NotifyRegister

func NotifyRegister(names []string) (fd int, tokens map[int32]string, err error)

NotifyRegister registers names on one file descriptor (created by the first registration) and returns it and the token of each name. Every delivery writes the token, a big-endian int32, to the descriptor.

func TeamID

func TeamID() string

TeamID is the Team ID of the running process's code signature; "" when unsigned or ad hoc.

Types

type RunningApp

type RunningApp struct {
	PID  int
	Path string // the .app bundle
}

RunningApp is a running process of an app.

func Running

func Running(bundleID string) ([]RunningApp, error)

Running lists the running processes of a bundle id (NSRunningApplication runningApplicationsWithBundleIdentifier:).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL