Post

Replies

Boosts

Views

Activity

Reply to Different behaviour running app from inside XCode or from /Applications
That’s not a supported location of nested code. See the Nested Code section of Technote 2206 macOS Code Signing In Depth for our advice on this front. So I suppose the correct destination is (or should be) Contents/Helpers You may want to package your command-line tool in an app-like structure to ensure that the sandbox gets set up coherently. I'm not sure to understand (please apologize me) do you mean creating a separated "bundle" containing only the command-line tool? I've tried to add a 'Copy File' to XCode Build Phases but the combo box doesn't contain Helpers so I chosen Destination: Absolute Path Path: $(CONTENTS_FOLDER_PATH)/Helpers but the application doesn't compile Then I tried Destination: Wrapper Path: Contents/Helpers the application compiles, the tool is copied inside the correct path but if the application is launched from XCode the command line tools fails to "call it" as described in first scenario
Nov ’20
Reply to Sandboxed app and command line tool but Apple Events require temporary-exception
Right. A sandboxed app (well, in this case, a sandboxed tool) needs this entitlement in order to send arbitrary Apple events. The Apple events destination is only the app contained in the same tool bundle, the temporary entitlement sounds a bit extreme in this case There is an alternative here, namely com.apple.security.scripting-targets. See Enabling Scripting of Other Apps in the Entitlement Key Reference. I already found this info but this sounds like another level of complexity with its scriptable app’s scripting access groups. If your app needs to control another scriptable app, your app can use the scripting targets entitlement to request access to one or more of the scriptable app’s scripting access groups. Thanks again to point me out to the right direction
Nov ’20
Reply to Migrating from Sandboxed NSConnection to NSXPCConnection
Hi Quinn, The app is distributed via the Mac App Store Actually I'm working inside the AppSandboxLoginItemXPCDemo, so yes the helper tool is embedded withing the app (and also the command line tool) The answer to your last question is a bit complicated, so I prefer to describe the current scenario (with NSConnection). The command line tool is used to make only one specific task: start the application from the terminal and "wait" until the application window associated to (or the whole app) is closed. The command line tool passes (using NSConnection) some parameters to the application and the "wait" flag is one of them. The command line tool is pretty much identical to the BBEdit command line bbedit and bbdiff helpers but sandboxed for the Mac App Store
Nov ’20