Question

All:

I write a daemon using Cocoa, it works fine. But after a reboot the MacBook Pro, the applicationDidFinishLaunching is not get invoked.
I notice that when try to attach the process using Xcode "Product->Attach to Process", its icon is console application icon, it seems it did not load resource file at all.
If I kill the process using Activity Monitor, then the process start again, at this time, all work as expected, the icon in Xcode "Product->Attach to Process" now show as Cocoa icon.
Just feel strange, how could I make it work after restart?
My plist file is in /Library/LaunchDaemon/com.sss.mytest.plist
My App file is in /Applications/Mytest.app

Thanks, Ryo

Was it helpful?

Solution

I got this to work, it seems 'loginwindow' not started before user login, so no windows could be processed, so the load for window is fail, now i use foundation tool instead of Cocoa, all work fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top