【问题标题】:How to load SIMBL plug-in to the SystemUIServer如何将 SIMBL 插件加载到 SystemUIServer
【发布时间】:2011-01-25 11:00:58
【问题描述】:

我有开发两个 SIMBL 插件的经验。

目前它们在 Mac OS X 10.6.6 上正常运行。

我打算创建一个新的 SIMBL plug-in 来修改 Menu Extra 的行为。

Menu Extra 属于 SystemUIServer。

SystemUIServer 存在于这个地方:

/System/Library/CoreServices/SystemUIServer.app/Contents/MacOS/SystemUIServer

SystemUIServer 的捆绑标识符是 com.apple.systemuiserver。

所以我在 Info.plist 中添加了一个密钥 SIMBLTargetApplications,如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
 <key>CFBundleDevelopmentRegion</key>
 <string>English</string>
 <key>CFBundleExecutable</key>
 <string>${EXECUTABLE_NAME}</string>
 <key>CFBundleIconFile</key>
 <string></string>
 <key>CFBundleIdentifier</key>
 <string>com.yourcompany.${PRODUCT_NAME:rfc1034Identifier}</string>
 <key>CFBundleInfoDictionaryVersion</key>
 <string>6.0</string>
 <key>CFBundleName</key>
 <string>${PRODUCT_NAME}</string>
 <key>CFBundlePackageType</key>
 <string>BNDL</string>
 <key>CFBundleShortVersionString</key>
 <string>1.0</string>
 <key>CFBundleSignature</key>
 <string>????</string>
 <key>CFBundleVersion</key>
 <string>1</string>
 <key>NSPrincipalClass</key>
 <string></string>
 <key>SIMBLTargetApplications</key>
 <array>
  <dict>
   <key>BundleIdentifier</key>
   <string>com.apple.systemuiserver</string>
  </dict>
 </array>
</dict>
</plist>
  1. 构建一个 Foo.bundle。
  2. 复制到 $HOME/Library/Application Support/SIMBL/Plugins。
  3. 运行“killall SystemUIServer”。
  4. 使用 Console.app 仔细查看日志消息。

但 Foo.bundle 在重新启动时不会加载到 SystemUIServer。

如果将 BundleIdentifier 更改为其他通用应用名称,它可以正常工作。

这有什么问题?

--

莫亚希

ttp://hitoriblog.com/

【问题讨论】:

    标签: objective-c simbl


    【解决方案1】:

    SIMBL 仅适用于可可应用程序。 SystemUIServer 不是可可应用程序。检查其符号链接以获取更多证据。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-11-05
      • 1970-01-01
      • 2012-04-03
      • 2011-11-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多