Mac/Cocoa - Settings Pane Refresh App

93 views Asked by At

I have an app that has 2 parts: A preference pane and an app that runs in the background. I need the user to input some secure data in the preference pane, the pane then saves it to the keychain. My question is, what is the best way for the preference pane to tell the app to update from the keychain?

Let me know if you need anymore information

Thanks in advance.

1

There are 1 answers

0
indragie On BEST ANSWER

Use NSDistributedNotificationCenter. The API is similar to NSNotificationCenter except that a distributed notification can be posted and received across process boundaries. So in your case, the preference pane would post a distributed notification with some unique name, and the app would register for that notification to know when to update from the Keychain.