Easily run shortcuts, from your app!
The Shortcut object provides all the information ShortcutsKit needs to run it.
import ShortcutsKit
let shortcut = Shortcut(name: "Shortcut Name!") // Initialize
print(shortcut.name) // Access NameQuickly list all the shortcuts on a Mac by accessing the property shortcuts. Returns an array of Shortcuts.
import ShortcutsKit
let shortcuts = Shortcuts.default.shortcutsFinally, the thing you've been waiting for: Running shortcuts.
👉 Important note 👈
runShortcutblocks until the shortcut is finished running.
import ShortcutsKit
let shortcut = Shortcut(name: "Name") // Initialize
Shortcuts.default.runShortcut(shortcut) // Run the shortcut