objective-c – SMJobRemove成功,但plist和helper工具未删除

objective-c – SMJobRemove成功,但plist和helper工具未删除,第1张

概述我正在尝试删除通过SMJobBless安装的特权帮助工具,我获得了正值返回值并且没有错误,但是/ Library / PrivilegedTools和/ Library / LaunchDaemons中的文件不会被删除.我是否必须自己删除这些文件? 从我阅读的文档中: Return Value true if the job was removed successfully, otherwise 我正在尝试删除通过SMJobBless安装的特权帮助工具,我获得了正值返回值并且没有错误,但是/ library / PrivilegedTools和/ library / launchdaemons中的文件不会被删除.我是否必须自己删除这些文件?

从我阅读的文档中:

Return Value true if the job was removed successfully,otherwise
false.

我打电话给以下人员删除这份工作:
result = SMJobRemove(kSMDomainSystemlaunchd,(__ brIDge CFStringRef)label,_authref,YES,& errorCF);

解决方法 谢谢jatoben,那个帖子得到了我正在寻找的答案.

怀疑你必须自己删除文件或使用以下内容:(取自Apple dev论坛:)

SMJobRemove is the equivalent of “launchctl remove”. That is,it removes the job from launchd but has no effect on the disk at all. Thus the job will get reloaded the next time you start up. To get around that you have to either remove the pList yourself or by fork/exec’ing “launchctl unload -w”.

总结

以上是内存溢出为你收集整理的objective-c – SMJobRemove成功,但plist和helper工具未删除全部内容,希望文章能够帮你解决objective-c – SMJobRemove成功,但plist和helper工具未删除所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/web/1034061.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存