Documentation
¶
Overview ¶
Command macapp assembles xrdesk into a macOS application bundle.
⛔ THE BUNDLE IS NOT PACKAGING, IT IS THE ONLY WAY TO REACH A CAMERA. macOS does not DENY a program with no NSCameraUsageDescription, it ENDS it: TCC terminates the process before anything can be caught. A bare binary run from a terminal has no Info.plist at all, so xrdesk built with `go build` can list cameras and can never open one.
⛔ AND IT IS SIGNED, OR EVERY PERMISSION IS LOST ON THE NEXT BUILD. macOS grants screen recording, the camera and the microphone to a CODE IDENTITY, and an ad-hoc signature -- what the Go linker leaves behind -- IS the hash of the binary. Change one line and it is a different application that has been granted nothing. That is not theoretical: the desk recorded the screen in 72 consecutive runs, took a one-line dependency bump, and could not record it in the 73rd. So this signs by default with whatever certificate is on the machine, and says so.
go run ./cmd/macapp # writes ./dist/XR desk.app go run ./cmd/macapp -dir /tmp go run ./cmd/macapp -sign - # ad hoc, and the grants will not survive