From 82eaa63db20b0edf35bbcb634cf0c5fce5cb93c6 Mon Sep 17 00:00:00 2001 From: Ryan Nielsen Date: Mon, 5 Nov 2012 19:08:30 -0800 Subject: [PATCH] Set the blessed key that keeps pboxd from appearing in the Dock along side our app MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If SandboxService.plist doesn't have JoinExistingSession as YES in the XPCService dictionary, the XPC service will instantiate its own security session, separate from the app. While this seems inoccous, it may lead to subtle (or, in our case, not so subtle) problems. In our case, as a sandboxed NSDocument based app, pboxd is instantiated on launch. When our app is in a different security session – as it would be without this key – the Dock actually shows pboxd running alongside our app, looking like our app. Effectively, the user sees two copies of our app but one seems totally broken. Setting JoinExistingSession to YES makes everyone happy. --- SandboxService.plist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SandboxService.plist b/SandboxService.plist index a36bd3c4..2dc4ccf2 100644 --- a/SandboxService.plist +++ b/SandboxService.plist @@ -24,6 +24,8 @@ ServiceType Application + JoinExistingSession +