Post

Replies

Boosts

Views

Activity

FIFinderSync and NSFileProviderReplicatedExtension together
Can these FIFinderSync and NSFileProviderReplicatedExtension work together? My app contains FIFinderSync Extension for files and folders to show Overlay icons. Recently I implemented FileProviderExtension to get the power of cloudsync. As both of them are bundled at the same location Contents/PlugIns/. Only the FileProviderExtensions work. Both have the same NSExtensionPointIdentifers, one uses com.apple.findersync while another one com.apple.fileprovider-nonui. Is this a limitation or what do I need to do so that both work together? Edit: I just noticed, FinderExt and FileProviderExt keeps switching/swapping in between. So both work in parts. But not together.
2
0
747
Oct ’23
Is there any API for Full Disk Access in MacOS?
From this post, it is clear there was API as such to know if the FDA was granted or not. https://developer.apple.com/forums/thread/114452 But this post is 4 years old. I tried to find one that would ease my work, but to my surprise we are still there. So how an Application decide to know if FDA given then proceed, otherwise show a custom message/screen etc? Apple should expose and API in Terminal, Plist, Cocoa.
1
0
566
Oct ’23
How to observe one particular directory?
I created an ES Client, as I run it, it logs all the processes under /. So I add mute_path_prefix for those. I expect to see Notifications from /Users/anoopvaidya/, but it is not happening. What am I missing here? Any help, suggestions, guidance is highly appreciated. static void handleEvent(es_client_t *client, const es_message_t *msg) { char const *filePath = msg->process->executable->path.data; NSString *filePathString = [[NSString alloc] initWithFormat:@"%s", filePath]; os_log(OS_LOG_DEFAULT, "filePathString = %@", filePathString); } void mutePath(es_client_t *client) { os_log(OS_LOG_DEFAULT,"Adding muted files list"); NSArray<NSString *> *paths = @[ @"/Applications/", @"/bin/", @"/cores/", @"/Library/", @"/opt/", @"/private/", @"/sbin/", @"/System/", @"/usr/", @"/var/", ]; for (NSString *path in paths) { es_mute_path_prefix(client, [path UTF8String]); } } int main(int argc, char *argv[]) { // Create the client es_client_t *client = NULL; es_new_client_result_t newClientResult = es_new_client(&client, ^(es_client_t *c, const es_message_t *message) { handleEvent(client, message); }); if (newClientResult != ES_NEW_CLIENT_RESULT_SUCCESS) { return 1; } es_event_type_t events[] = { ES_EVENT_TYPE_NOTIFY_CREATE, //create file ES_EVENT_TYPE_NOTIFY_OPEN, // open file ES_EVENT_TYPE_NOTIFY_RENAME, // rename file ES_EVENT_TYPE_NOTIFY_CLOSE, // close file ES_EVENT_TYPE_NOTIFY_WRITE, // write to file ES_EVENT_TYPE_NOTIFY_UNLINK, // delete ES_EVENT_TYPE_NOTIFY_EXIT }; if (es_subscribe(client, events, sizeof(events) / sizeof(events[0])) != ES_RETURN_SUCCESS) { os_log(OS_LOG_DEFAULT, "Failed to subscribe to events"); es_delete_client(client); return 1; } mutePath(client); dispatch_main(); }
1
0
732
May ’23