Probably. Both of your examples seem kinda wonky to me.
Yeah this is garbage code anyway. I'll prolly use a singleton or instantiate it in the App stuct.
You have double dots in that screen shot, that is, this:
I already fixed this :) But it did not fixed it.
I put the code into this repo: https://github.com/tony-go/NetworkMonitor
The only missing part is the ~/Library/LaunchAgents/W4MF6H9XZ6.com.tonygo.NetworkMonitorApp.xpc.plist file:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>W4MF6H9XZ6.com.tonygo.NetworkMonitorApp.xpc</string>
<key>ProgramArguments</key>
<array>
<string>/Users/tonygorez/Desktop/Builds/Release/NetworkMonitor</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<false/>
<key>MachServices</key>
<dict>
<key>com.tonygo.NetworkMonitorAgent</key>
<true/>
</dict>
</dict>
</plist>
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: