FinderSync: beginObservingDirectoryAtURL is not always called
Asked Answered
C

1

7

I'm implementing a Finder Sync extension, and have encountered some weird issues with my FIFinderSync implementation.

The callback beginObservingDirectoryAtURL is not always called. Usually, when its not called its for the first or second level under my root folder.

Has anyone encountered a similar issue? Anyway to enforce the callback that I may be missing?

Cecelia answered 10/9, 2015 at 7:41 Comment(2)
I'm having the same issue. Did you fixed the issue?Flin
@Flin sorry its been a long time and I stopped working on it sinceCecelia
P
5

I'm currently encountering a similar problem.

What I determined is that the Finder Sync Extension will deallocate and re-allocate my FIFinderSync object while my extension's process is running. This can happen if my application disables and then re-enables the extension at startup. It can also happen if the user disables and then re-enables the extension while its process is running.

To diagnose this, I suggest adding logging to your FIFinderSync object's init and dealloc methods. Make sure that objects that hold references to your FIFinderSync use weak references, so you know that your FIFinderSync is being properly deallocated.

Also, your FIFinderSync will need to tolerate recovering its connections back to your product in its second, third, ect, re-init. This was my ultimate problem: my extension wasn't recovering the connection already made back into the product's main process.

Parrotfish answered 6/11, 2015 at 22:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.