How to link OSX Notification center widget with main application?

| | August 5, 2015

How to link App extension (Widget for Notification center) with main application as in Things.

For example I check checkbox in widget and this changes momentarily appears in main window of application?

I did not find solution of this question in official documentation about extensions.

Thank you!

One Response to “How to link OSX Notification center widget with main application?”

  1. There is quite some stuff that needs to be done to make this right. Apple provides a lot information about syncing between extensions and the main application.

    Take a look at the 2014 WWDC Sessions:

    Session 205 – Creating Extensions for iOS and OS X (Part 1)

    Session 217 – Creating Extensions for iOS and OS X (Part 2)

    Furthermore, there is great Sample Code about this topic in Lister, a productivity sample app by Apple.

    In a nutshell:
    Both the main app and the extension have to be in an App Group, so that they can share the data. Use NSFileCoordinator to read and write the shared data. (to avoid corrupted files)

Leave a Reply