macos - 什么是 CFErrorDomainLaunchd 错误 2?

标签 macos drivers launchd

我在任何 header 中都找不到 CFErrorDomainLaunchd。我用的是 find 命令用于 grep 10.11 SDK 中的每个头文件。

我也尝试过谷歌:

site:opensource.apple.com CFErrorDomainLaunchd

当我尝试安装我的帮助应用程序时,SMJobBless 将错误传回 及其 launchd plist。

我很困惑,因为安装运行得很好 昨天。我特此决定更频繁地检查我的代码 比我现在做的还要多。

Boolean             success;
CFErrorRef          error;

success = SMJobBless(
    kSMDomainSystemLaunchd,
    CFSTR("com.frescologic.FL2000.Uninstaller.UninstallerHelper"),
    self->_authRef,
    &error );     <-- This is CFErrorDomainLaunchd error 2

我永远欠你的情。

我正在开发 - 或尝试开发 - 驱动程序的卸载程序。它还会卸载用户空间程序以及 OS X 用于启动或停止该用户空间程序的 LaunchAgent plist。

最佳答案

一般表示找不到LaunchAgent。确保有一个构建阶段来复制目标类型为“Wrapper”且子路径为 Contents/Library/LaunchServices 的 Helper。还要确保产品名称与 plist 文件中使用的 bundle ID 相匹配。

例如:

<key>SMPrivilegedExecutables</key>
    <dict>
        <key>com.keenow.HelperTool</key>
        <string>anchor apple generic and identifier &quot;com.myapp.HelperTool&quot; and (certificate leaf[field.1.2.840.113635.100.6.1.9] /* exists */ or certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = &quot;YourTeamId&quot;)</string>
    </dict>

关于macos - 什么是 CFErrorDomainLaunchd 错误 2?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48433300/

相关文章:

linux - Cuda——本地编译远程运行

objective-c - 非 root 用户可以终止使用 ServiceManagement Framework 启动的 OS X "login item"吗?

php - 使用 Python 连接器在 Mac OSx 上安装 Mysql

Xcode 相当于 ' __asm int 3/DebugBreak()/Halt?

python - 如何在 Python 路径之间切换?

drivers - 适用于自己操作系统的 AHCI 驱动程序

Android 设备未出现在 Eclipse 中

mysql - 删除 mysql 符号链接(symbolic link),因为它没有指向任何内容

macos - SMJobBless - 有关何时要求管理员密码的文档

macos - 通过 launchd 在关机时运行 Shell 脚本