FinderSync invalidated on El Capitan

128 views Asked by At

We have an application written in Mono that needs to communicate with an Finder Sync App extension.

All is working fine until we tried our app on El Capitan instead of on Yosemite.

We use a shared SQLite database to tell what paths are in which state and use NSDistributedNotificationCenter for communication between the two.

The shared SQLite database is outside of the sandboxed env so we have putted an excepention in our entitlements com.apple.security.temporary-exception.files.home-relative-path.read-write

If we remove this exception from the app extension, the extension works (but obviously we can't read our db)

Then we tought of putting the SQLite DB into memory, but shared memory databases isn't possible over multiple processes.

I can't find how I can create a NSFileHandle for a Sqlite Connection.

We could send over all the info to the application extension, but then that has to keep it in memory (preferably in a SQLite, cause we need to do some querying.)

Does anyone has some pointers of what we could do?

1

There are 1 answers

2
Ivan On BEST ANSWER

Try to look in The Application Group Container Directory it might do in your case. Basically it allows you to have shared folder between apps/extension.

App group container directories. A sandboxed app can specify an entitlement that gives it access to one or more app group container directories, each of which is shared among all apps with that entitlement.

After some research on similar problem I found it's much easier to have simple TCP server in main app that responds to extension with file status. This way you can easily broadcast file status change to all extension instances etc.