My main application is faceless (no icon in the Dock neither in the menu bar) and I would like to develop another application for managing the preferences.

How can I achieve this (like AlfredApp for the ones who know this app)?

有帮助吗?

解决方案

Theoretically you could use NSUserDefaults's addSuiteNamed: method. Apple's docs say, about this method:

The suiteName domain is similar to a bundle identifier string, but is not tied to a particular application or bundle. A suite can be used to hold preferences that are shared between multiple applications.

Anyway, this would allow you to write to the NSUserDefaults of that application.

Having said that, using NSUserDefaults - or any other method of preference file writing - is going to be restricted if your app is sandboxed (aka: you're writing it for the Mac App Store). So, depending on your goals for the app / distribution method, maybe you should revise your plan.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top