本文介绍了NSWorkspace runningApplications不返回我的XPC mach服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
NSArray *activeApps = [[NSWorkspace sharedWorkspace] runningApplications];
返回正在运行的应用程序和代理,但我看不到我正在运行的XPC mach服务即使在活动监视器中查找PID时,也会显示在活动监视器进程中)
Returns running applications and agents, but i cannot see my running XPC mach service (although it is running and visible in activity monitor processes)
id res = [NSRunningApplication runningApplicationWithProcessIdentifier:223];
我得到结果,虽然与其他进程,这工作很好
i get res nil, although with other processes this works well
推荐答案
说明:
你想完成什么?您不需要以这种方式检查服务。
What exactly you trying to accomplish? you dont need to check for a service in this way.
这篇关于NSWorkspace runningApplications不返回我的XPC mach服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!