Making AppleScript Work in macOS CLI Tools: The Undocumented Parts | Peter Steinberger
The Bottom Line
Making AppleScript work in CLI tools requires:
- An embedded Info.plist for identity
- Proper entitlements for permissions
- Correct code signing
- Optional:
responsibility_spawnattrs_setdisclaimfor cleaner permission dialogs