Is it possible to distribute a command line application to the Mac App Store?
No. It’s call the Mac App Store for a reason (-
Is it possible to bundle a Command Line Tool in along with a regular Cocoa Application and submit that to the Mac App Store …
You can include a common line tool within a Mac App Store app, and lots of apps use this technique for helper tools, but things get tricky if you want to expose that tool to users. The specific gotcha is sandboxing. Command line tools within a Mac App Store app must use an inherited sandbox (
com.apple.security.inherit
). However, such tools cannot be executed from Terminal because there’s no sandbox to inherit.
You can work around this by bundling your command line tool into a helper app and applying app-style sandboxing to that. The problem here is that your code will then run inside an app sandbox, which can cause all sorts of problems (for example, if the user supplies a path as a command line argument, the sandbox might block your access to that path).
What sort of tool are you trying to ship? There may be a way around this problem but the best approach depends on the overall shape of your product.
Share and Enjoy
—
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"