findersync

No callback when clicking menu item

[亡魂溺海] 提交于 2019-12-06 12:35:34
问题 I'm trying to implement a simple context menu in my FinderSync extension. I built the following using some examples, and my problem is that the callback is never called when I click the menu item. Source code: ContextMenuHelper.h #import <Foundation/Foundation.h> #include "FinderSync.h" @interface ContextMenuHelper : NSObject + (NSMenu *)buildMenu; @end ContextMenuHelper.m #import "ContextMenuHelper.h" #define SharedContextMenuTarget [ContextMenuTarget sharedInstance] @interface

How to embed a mac app extension in an Electron app?

本小妞迷上赌 提交于 2019-12-06 02:21:50
问题 I'm trying to embed a Finder Sync extension written in Swift in my app written with Electron. How can I manage to make them work together and communicate with each other? I have read the Apple documentation but it only explains how to add a target to a native application. I also noticed that I can manually inject the .appex compiled file (produced by XCode) in the application Plugins folder using electron builder. How can I develop and test the extension in XCode and embed it correctly in a

Using Security Scoped Bookmark in Finder Sync Extension with App Group UserDefaults

眉间皱痕 提交于 2019-12-05 05:24:23
I am getting following error while resolving Security Scoped Bookmark in my finder sync extension. Error Domain=NSCocoaErrorDomain Code=259 "The File couldn't be opened because it isn't in the correct format." and also possibly the related logging: Failed to read values in CFPrefsPlistSource<0x6080000ee380> (Domain: MyAppGroupName, User: kCFPreferencesAnyUser, ByHost: Yes, Container: (null)): Using kCFPreferencesAnyUser with a container is only allowed for System Containers, detaching from cfprefsd I am using following code to create Security Scoped bookmark in Container App: NSUserDefaults

No callback when clicking menu item

删除回忆录丶 提交于 2019-12-04 19:20:29
I'm trying to implement a simple context menu in my FinderSync extension. I built the following using some examples, and my problem is that the callback is never called when I click the menu item. Source code: ContextMenuHelper.h #import <Foundation/Foundation.h> #include "FinderSync.h" @interface ContextMenuHelper : NSObject + (NSMenu *)buildMenu; @end ContextMenuHelper.m #import "ContextMenuHelper.h" #define SharedContextMenuTarget [ContextMenuTarget sharedInstance] @interface ContextMenuTarget : NSObject + (ContextMenuTarget *) sharedInstance; @end @implementation ContextMenuTarget - (void)

How to embed a mac app extension in an Electron app?

半世苍凉 提交于 2019-12-04 08:30:50
I'm trying to embed a Finder Sync extension written in Swift in my app written with Electron . How can I manage to make them work together and communicate with each other? I have read the Apple documentation but it only explains how to add a target to a native application. I also noticed that I can manually inject the .appex compiled file (produced by XCode) in the application Plugins folder using electron builder . How can I develop and test the extension in XCode and embed it correctly in a custom Electron app? Any suggestion? Thank you very much for any suggestion Create PlugIns folder in

FinderSync check if extension is selected

为君一笑 提交于 2019-12-03 15:09:36
I am developing a FinderSync extension and I have some issues in checking if the selection is selecting, or selecting/deselecting the extension. Is there a way to programmatically check if a FinderSync extension is selected in System Preferences->Extensions ? Are there any API's to get notified when this selection changes? Is there any API to select/deselect an extension, beside using the following? system("pluginkit -e use -i com.mycompany.finderExt") Note that I have already visited these pages: How to enable FinderSync Extension in the System Preference in Cocoa - Objective C OSX Finder

Adding Product Module Name to NSExtensionPrincipalClass in FinderSync plist crashes it

僤鯓⒐⒋嵵緔 提交于 2019-12-01 22:25:41
My cocoa application has a finder sync extension. As suggested in the Apple guide: https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Finder.html I added $(PRODUCT_MODULE_NAME) to my finder's info.plist. Doing this has caused the finder to crash even before it hits the init point. Even my uncaught exception handler isn't able to catch this exception. My extension's info.plist file. <?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>

OS X Finder Sync Extension

会有一股神秘感。 提交于 2019-12-01 09:36:45
I am not able to create a simple Finder Sync Extension. I have created a new OS X project and added the Finder Sync Extension target and I ran the extension attached to finder. The code appears to be running the init methods and the toolbar items methods are getting called but nothing is displaying in finder. The terminal is showing this when it runs 2015-04-20 12:45:52.700 pcssyncextension[3196:62451] Failed to connect (colorGridView) outlet from (NSApplication) to (NSColorPickerGridView): missing setter or instance variable 2015-04-20 12:45:52.701 pcssyncextension[3196:62451] Failed to

Read and Write access for FinderSync extension in a sandboxed environment

帅比萌擦擦* 提交于 2019-11-30 20:46:59
The scenario The user right-clicks a directory in Finder and finds a custom MenuItem. Clicking that Item will tell my app to open up a window where the user can do his work. When he is finished files need to be written to to the folder he selected by right-clicking. The Problem I got everything to work now, but the very last part. The extension can't write to the selected folder. The user selecting the folder he wants to interact with seems to not be part of the Powerbox which - how I understand it - is only activated with openPanel and savePanel . How do I get the rights to interact with the

How should Finder Sync Extension and Main App communicate?

泪湿孤枕 提交于 2019-11-28 08:49:14
My use case: I have a 'MainApp' which does the syncing of files. I would like that 'MainApp' handles all server calls regarding syncing and other REST API calls such as document-sharing, etc. On the other hand, I would have a Finder Sync Extension which would show sync-status icon overlays. It would also have a file-context-menu-item 'Share' which would present a Share dialog where users can choose with whom to share the file. Questions: How should FinderSyncExtension and MainApp communicate? Should XCP be utilised and if so, is it ok that communication is two-ways? For example MainApp