문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top