How to call AppleScript handlers from Swift via AppleScript-ObjC bridge.
hhas/Swift-AppleScriptObjC
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Code
Latest commit
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
README A simple "remote control" for Music.app which demonstrates how to call AppleScript via the AppleScript-ObjC (ASOC) bridge within a Swift-Cocoa app. Caution: The AppleScript code lacks detailed error reporting and the Swift code's error handling is minimal. The app will fail *silently* if the following requirements are not met: - The Plist.info file must contain an "NSAppleEventsUsageDescription" entry. - If Hardened Runtime is enabled, the Apple Events exception in Targets > Signing & Capabilities must be selected. - If sandboxing is enabled, the appropriate "com.apple.Music.library..." entitlements must be declared. - The user grants the app Authorization to control Music.app when first prompted by macOS. This code is released into the public domain.
About
How to call AppleScript handlers from Swift via AppleScript-ObjC bridge.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published