macos-manage-apps
v1.2.0
Published
Launch and terminate apps on macOS
Downloads
101
Maintainers
Readme
macos-manage-apps
Launch and terminate apps on macOS
If you're on macOS 10.14.3 or earlier, you need to download the Swift runtime support libraries.
Install
$ npm install macos-manage-apps
Usage
const {launchApp, terminateApp} = require('macos-manage-apps');
(async () => {
await launchApp('com.sindresorhus.Dato');
await terminateApp('com.sindresorhus.Dato');
})();
API
launchApp(bundleId: string): Promise<true>
Tries to launch the app with the given bundle identifier. It will resolve if it succeeds, and reject with an error otherwise.
bundleId
The bundle identifier of the app.
terminateApp(bundleId: string): Promise<true>
Tries to terminate the app with the given bundle identifier. It will resolve if it succeeds, and reject with an error otherwise.
bundleId
The bundle identifier of the app.
isAppRunning(bundleId: string): Promise<true>
Check whether the app with the given bundle identifier is running. It will resolve with true if it's running and false otherwise.
bundleId
The bundle identifier of the app.
Related
- mac-focus-window - Focus a window and bring it to the front on macOS
- mac-windows - Provide Information about Application Windows running
License
MIT