Mirror of https://github.com/hsiangenlinlin/air-accept.git
|
|
6 месяцев назад | |
|---|---|---|
| Resources | 6 месяцев назад | |
| Sources | 6 месяцев назад | |
| Tests | 6 месяцев назад | |
| .gitignore | 6 месяцев назад | |
| Makefile | 6 месяцев назад | |
| Package.swift | 6 месяцев назад | |
| README.md | 6 месяцев назад |
AirAccept is a small macOS menu bar app that watches for incoming AirPlay Receiver prompts and automatically presses Accept only when the prompt clearly matches an AirPlay request.
It is intended for a Mac that already has the built-in AirPlay Receiver enabled in System Settings.
AirAccept does not require Screen Recording and does not use AppleScript/System Events automation.
make test
make app
The app bundle is created at:
build/AirAccept.app
To build and launch in one step:
make run
If open appears to do nothing, run the app in the foreground to see launch errors:
make debug-run
When it is running correctly from debug-run, the command stays active until you quit AirAccept or press Ctrl-C.
You can move that app bundle to /Applications after building. Keeping the app in a stable path is recommended because macOS Accessibility permissions are tied to the app identity and path.
build/AirAccept.app.AirAccept -> Request Accessibility Permission.To confirm it launched, check the log:
tail -n 20 "$HOME/Library/Logs/AirAccept/airaccept.log"
You should see a line like:
[info] ... AirAccept launched pid=12345
AirAccept creates this file on first run:
~/Library/Application Support/AirAccept/config.json
Default config:
{
"poll_interval_ms": 2500
}
poll_interval_ms controls how often AirAccept checks Notification Center for a matching AirPlay request.
AirAccept writes newline-delimited JSON events to:
~/Library/Logs/AirAccept/airaccept.log
Each event includes timestamp, host process, prompt summary, parsed device name, action, and reason. It also writes to Apple unified logging with subsystem com.airaccept.AirAccept.
Use the menu bar item:
AirAccept -> Launch at Login
This uses SMAppService.mainApp, the macOS 13+ login item API.
AirAccept does not click arbitrary system dialogs. A prompt must contain AirPlay-specific request text, such as a device wanting to AirPlay to this Mac, and an accept-like Accessibility action before AirAccept clicks through the Accessibility path.