【问题标题】:Disabling & Enabling is not launching the finder sync extension禁用和启用不会启动 finder 同步扩展
【发布时间】:2017-05-23 21:13:53
【问题描述】:

可以从系统偏好设置中的扩展设置中启用或禁用 Finder 同步扩展。

我的扩展程序没有随应用程序一起启动,即使启用了扩展程序的复选标记。

所以要启动扩展程序,我禁用我的扩展程序并再次启用它。这不是启动扩展应用程序吗?

因此想知道我是否在这里遗漏了任何方面。

注意:如果应用程序正在运行,并且我禁用了扩展程序,它会退出扩展程序应用程序(需要一些时间)

我的 Finder 同步扩展的 Info.Plist。

 <?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>en</string>
    <key>CFBundleDisplayName</key>
    <string>My Finder Integration</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>CFBundlePackageType</key>
    <string>XPC!</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>LSMinimumSystemVersion</key>
    <string>$(MACOSX_DEPLOYMENT_TARGET)</string>
    <key>LSUIElement</key>
    <true/>
    <key>NSExtension</key>
    <dict>
        <key>NSExtensionAttributes</key>
        <dict/>
        <key>NSExtensionPointIdentifier</key>
        <string>com.apple.FinderSync</string>
        <key>NSExtensionPrincipalClass</key>
        <string>FinderSync</string>
    </dict>
    <key>NSHumanReadableCopyright</key>
    <string>Copyright © **** All rights reserved.</string>
    <key>NSPrincipalClass</key>
    <string>NSApplication</string>
    <key>NSSupportsAutomaticGraphicsSwitching</key>
    <true/>
</dict>
</plist>

【问题讨论】:

  • 请将您的 info.plist 的内容添加到您的 Q 中。
  • @AminNegm-Awad 添加了我的 finder 同步扩展 plist 的屏幕截图。
  • 这是完整的 plist 吗?不要将其添加为图像。
  • 你找到了吗?启用/禁用对我来说按预期工作:启动或停止扩展。

标签: objective-c xcode8 macos-sierra findersync


【解决方案1】:

根据这个documentation,键NSExtensionPrincipalClass的值应该包括模块名称,用.分隔:

<string>$(PRODUCT_MODULE_NAME).FinderSync</string>

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-12-12
  • 1970-01-01
  • 2010-10-20
  • 1970-01-01
相关资源
最近更新 更多