findersync

Finder Sync/Overlays Extension not launching

孤人 提交于 2020-05-17 07:46:09
问题 I am facing an issue where finder overlays sync icons are not shown. Here is the code that I tried: NSString* bundleID = @"com.my.myapp"; NSString* extBundleID = [NSString stringWithFormat:@"%@.finderoverlays", bundleID]; NSString* runCommand = [NSString stringWithFormat:@"pluginkit -e use -i %@", extBundleID]; NSLog(@"runcommand= %s", runCommand.UTF8String); int result = system(runCommand.UTF8String); NSLog(@"setting up finder overlays, returned = %d", result); The result is always 0, but

OS X Finder Sync Extension

ぐ巨炮叔叔 提交于 2019-12-30 10:27:29
问题 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):

How should Finder Sync Extension and Main App communicate?

送分小仙女□ 提交于 2019-12-28 13:39:08
问题 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?

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

Deadly 提交于 2019-12-22 04:47:20
问题 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

Adding Product Module Name to NSExtensionPrincipalClass in FinderSync plist crashes it

百般思念 提交于 2019-12-20 01:59:42
问题 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 "-/

Read and Write access for FinderSync extension in a sandboxed environment

半城伤御伤魂 提交于 2019-12-19 02:06:08
问题 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

How to give context menu item for .zip files only?

只谈情不闲聊 提交于 2019-12-11 06:53:37
问题 I am Developing the zip extractor app in cocoa for which i'm using findersync to show context menu item. But, the problem is item is showing for every file i want to show only for .zip files so how do i do that . Any Suggestion. Thanks in Advance! 回答1: Try this NSURL *selectedURL = FIFinderSyncController.defaultController.selectedItemURLs[0]; NSURL *fileURL = selectedURL.filePathURL; if([fileURL.pathExtension isEqualToString:@"zip"]) { NSMenu *menu = [[NSMenu alloc] initWithTitle:@""];

How to launch app's FinderSync Extension from code?

大城市里の小女人 提交于 2019-12-11 03:52:58
问题 I've made finder sync extension using instruction. It displays in finder when I launch it directly from Xcode. But it is not visible when I run the main app. Is there some way to do it for sandbox app? In not sandboxed app I used the code: NSTask *fseEnable = [[NSTask alloc] init]; fseEnable.launchPath = @"/usr/bin/pluginkit"; fseEnable.arguments = @[@"-e", @"use", @"-i", @"com.team.AppName.FinderSyncExtension"]; [fseEnable launch]; But it does not work for sandboxed. I tried: [[NSWorkspace

FinderSync check if extension is selected

匆匆过客 提交于 2019-12-09 11:47: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

How to launch Finder Sync Extension on launching the main app?

家住魔仙堡 提交于 2019-12-07 05:49:33
问题 In my Cocoa application, I have a finder sync extension. On launching the application, my finder sync extension doesn't start automatically. I need to go to System Preferences -> Extensions and enable it. How do i make sure that on launch of my main application (.app) file the finder sync extension is launched and is enabled? 回答1: Checkout https://blog.codecentric.de/en/2018/09/finder-sync-extension/ There is a section Restarting FinderSyncExtension on app launch with instructions on how to