You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, the "install" and "uninstall" targets are quite weird (they do their stuff at "build" time and not on "run" time - so on later Xcode versions, they simply fail immediately for not producing anything.
Second - you indeed said in ReadMe -
You will need to set SUDO_ASKPASS to run the installation and uninstallation targets.
but you didn't say where and to what --- I looked quite everywhere and didn't manage to find a way to make this work (I even saw your own setting somewhere in the project - assumed the value should be 'root' password and tried that too - to no avail.
So finally - only by doing both the "install" and "uninstall" stages manually in terminal (copying the .plist, the binary and then using launchctl to load the daemon) was I finally able to Mae things work. So -- this part needs some enhancement.
HOWEVER... I'm trying to use this wisdom and know-how in my own project, and simply cannot make it work.
I replicated almost exactly what you did, and my "Client" (some sample UI app I put up for this) cannot "talk" to the "XPC Service" (a global daemon I have). the lazily-initialised "connection" property always gets the "connection invalidated".
while my daemon's "listener" delegate (the one that should setup and approve a connection) simply never gets called.
Now... I wonder where I went wrong - and if there are specific "rules" you didn't write about ---
Mine is a global launch-daemon running with root privileges. its .plist is installed exactly the same place as yours, but the binary cannot reside in /Library/PrivilegedHelpers/ because it MUST be packaged within an App bundle, which is stored in /Library/xxxxx/myDaemon.app
I wonder if you can help with identifying the missing part/s so that when I get it to work - I will be able to contribute to this repo, by enhancing the documentation, or even brining in more content...
I will be more than happy to hear from you.
The text was updated successfully, but these errors were encountered:
Regarding the first part of your issue. I followed this:
And then configured the first line of the run script like so in Xcode:
. ~/.zshrc
sudo -A ${PROJECT_DIR}/Scripts/install.sh ${PROJECT_DIR} ${BUILT_PRODUCTS_DIR}
Regarding the last portion of your issue, I am trying to figure out connect multiple clients to the Launch Daemon. It appears that the Client in this project works, but when I make a second client that tries to make a connection to the daemon the invalidationHandler is triggered.
Any ideas if Launch Daemons can handle multiple client connections?
First, the "install" and "uninstall" targets are quite weird (they do their stuff at "build" time and not on "run" time - so on later Xcode versions, they simply fail immediately for not producing anything.
Second - you indeed said in ReadMe -
but you didn't say where and to what --- I looked quite everywhere and didn't manage to find a way to make this work (I even saw your own setting somewhere in the project - assumed the value should be 'root' password and tried that too - to no avail.
So finally - only by doing both the "install" and "uninstall" stages manually in terminal (copying the .plist, the binary and then using launchctl to load the daemon) was I finally able to Mae things work. So -- this part needs some enhancement.
HOWEVER... I'm trying to use this wisdom and know-how in my own project, and simply cannot make it work.
I replicated almost exactly what you did, and my "Client" (some sample UI app I put up for this) cannot "talk" to the "XPC Service" (a global daemon I have). the lazily-initialised "connection" property always gets the "connection invalidated".
while my daemon's "listener" delegate (the one that should setup and approve a connection) simply never gets called.
Now... I wonder where I went wrong - and if there are specific "rules" you didn't write about ---
Mine is a global launch-daemon running with root privileges. its .plist is installed exactly the same place as yours, but the binary cannot reside in /Library/PrivilegedHelpers/ because it MUST be packaged within an App bundle, which is stored in /Library/xxxxx/myDaemon.app
I wonder if you can help with identifying the missing part/s so that when I get it to work - I will be able to contribute to this repo, by enhancing the documentation, or even brining in more content...
I will be more than happy to hear from you.
The text was updated successfully, but these errors were encountered: