简体   繁体   English

在Cocoa中的Finder扩展中完成同步后,Finder徽标图标无法刷新

[英]Finder badge icon not refresh after complete sync in Finder Extension in Cocoa

I am new to MAC development and using finder sync extension and successfully set badge icons for file and folder but my issue is that when i complete sync any file or folder to server the badge icon is not changing form sync to complete state. 我是MAC开发新手并使用finder同步扩展并成功设置文件和文件夹的徽章图标但我的问题是,当我完成将任何文件或文件夹同步到服务器时,徽章图标不会将表单同步更改为完成状态。 Please any suggestion how do i can refresh my file/folder badge icon (Like Dropbox) 请任何建议如何刷新我的文件/文件夹徽章图标(如Dropbox)

It's simple, First establish an Inter Process communication between your app and your extension. 这很简单,首先在您的应用和您的扩展程序之间建立Inter Process通信。 In an IPC, your app acts as a client and extension act as a server. 在IPC中,您的应用程序充当客户端,扩展充当服务器。 Now you know the state of a specific file, so just send the file path and status to the extension through IPC, Once extension receives the path and status, then call the Finder Sync controller's setBadgeIdentifier:forURL: method to set the appropriate badge. 现在您知道了特定文件的状态,因此只需通过IPC将文件路径和状态发送到扩展,一旦扩展接收到路径和状态,然后调用Finder Sync控制器的setBadgeIdentifier:forURL:方法来设置相应的徽章。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM