It's easy to create a ruby ββOS X app - create a structure like this:
xxx.app
βββ Contents
βββ Info.plist
βββ MacOS
β βββ xxx
βββ Resources
βββ xxx.icns
and enter the code to execute in xxx. But the launch time is noticeable, so I want this application to stay in the background and run some method when the application is open: therefore, when I launch this application for the first time, it executes the code that remains in the background when I I start another time, the application is already in the background, so it just starts the specified method.
Minimum Info.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleExecutable</key>
<string>newTabHere</string>
<key>CFBundleIconFile</key>
<string>newTabHere</string>
<key>LSUIElement</key>
<true/>
</dict>
</plist>
source
share