Search code examples
cocoaxpc

NSXPCConnection or XPCKit


There are two choices (or at least I know two) for implementing XPC client and service for Mac. NSXPCConnection which is introduced in 10.8 and XPCKit. What should I use to implement helper app that resides in menu bar and uses XPC to read data from the main app.

The main difference I see is that XPCKit will work in 10.7 Lion while NSXPCConnection is available only in 10.8 Mountain Lion. What else should I take into consideration when choosing between them. I'd be grateful for the responses from the developers who used both.

P.S. My app still works in 10.7, however from my previous experience it's not a problem to require the latest version of OS X in 2-3 months after release.


Solution

  • Finally I decided to use NSXPCConnection.

    • It is provided by Apple, so, less chances to have problems with updates.

    • Since the release of Mountain Lion and NSXPCConnection it seems that XPCKit is not supported any more.

    • I've tried both and for me personally NSXPCConnection seems to be a better solution