首页 > 解决方案 > 如何在 Xcode 中使用 AppleScript 创建一个简单的 kext 安装程序?

问题描述

谁能告诉我如何在 Xcode 中使用 AppleScrit 创建一个简单的 Kexts 安装程序?我尝试了以下方法:

on installKext:sender  
choose file
copy the result to thisFile
copy the (info for thisFile) to fileInfo
copy the name extension of the fileInfo to nameExtension
copy the file type of the fileInfo to filetype
tell application "Finder"
    if the filetype is "Kext" or ¬
        the nameExtension is "Kext" then
        move thisFile to folder "Extensions" of folder "Library" of folder "System" of startup disk
    end if
end tell
end installKext:

我有这个错误:

installKext:]: 未授权向 Finder 发送 Apple 事件。(错误-1743)

错误域=PlugInKit 代码=13 “查询已取消” UserInfo={NSLocalizedDescription=查询已取消}

标签: xcodeapplescript

解决方案


您必须在 info.plist 中添加以下内容: 在此处输入图像描述 现在一切都像魅力一样工作。


推荐阅读