How to enable FinderSync Extension in macOS System Preferences

前端 未结 3 592
一向
一向 2020-12-09 12:59

I am integrating FinderSync Extension in my Cocoa Application to show badges in files and folders. Look at the below two scenario:

  1. When i run application using
3条回答
  •  一整个雨季
    2020-12-09 13:08

    Linking an answer I found on the Apple developer forum:

    https://forums.developer.apple.com/thread/77682

    When your App is outside the Sandbox, you can use:

    Objective-C:

    system("pluginkit -e use -i ");
    

    Swift:

    let pipe = Pipe()
    let task = Process()
    task.launchPath = "/usr/bin/pluginkit"
    task.arguments = ["-e", "use", "-i", ""]
    task.standardOutput = pipe
    let file = pipe.fileHandleForReading
    task.launch()
    let result = NSString(data: file.readDataToEndOfFile(), encoding:
    

提交回复
热议问题