I’m trying to port my application to MacOS. The application consist of two parts: the first is client, which is simple GUI, the second one is server, which is responsible for IPC via unix sockets. I want to run server part as daemon (with root privileges), so I created plist file, placed it in /Library/LaunchDaemons/my.app.AppServer.plist
and load it with launchctl. Inside plist file I launch my app as /Applications/MyApp.app/Contents/MacOS/myapp --server
. Launching client (GUI) is just with no arguments. When I have launched daemon I can’t open my app in dock: The application "MyApp" is not open anymore
appears. I found some info that it has to be managed through AppDelegate
class with appropriate functions implementation. But I do not understand how to implement them the right way. Or maybe there’s another way to solve The application is not open anymore
when try to open app from finder/dock? Thank you in advance for answering
Tried to write AppDelegate.applicationWillFinishLaunch
to work differently based on presence --server
in CommandLine.arguments
, but unsuccessful
Vaider is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.