Hi, I have an application, it has a helper application in its bundle. After the application starts to run, it will launch the helper application process. The helper application process will load a XPCService embedded in its bundle by launchd. But I got an error which is
Error Domain=NSOSStatusErrorDomain Code=-10811 "kLSNotAnApplicationErr: Item needs to be an application, but is not" UserInfo={_LSLine=175, _LSFunction=_LSFindBundleWithInfo_NoIOFiltered}
How can the helper application launch a XPCService embedded in its bundle? Or the XPCService can only be launched in main application?
Thanks
By spawn a child process.
I figured out why this happens. It is because when launching the XPCService, during dyld, there was an error, it can not locate a lib file, so it crashed. After setting the rpath of XPCService, it can be launched successfully.
The error message confused me.
Thanks a lot.
By the way, does it matter that starts the helper application
by spawn a child process or using NSWorkspace? Which one do you suggest?