Cannot launch another application in Mac OS X 10.8 using NSWorkspace launchApplicationAtURL:options:configuration:error

I am launching another app using NSWorkspace launchApplicationAtURL:options:configuration:error.

The app is owned by root, has permission: rwx r-x r-x, and owned by root:wheel.
The app is also located in /Applications folder (e.g. /Application/MyApp.app).
According to the following link under the "Launching Helpers with Launch Services" section:http://developer.apple.com/library/mac/#documentation/Security/Conceptual/AppSan dboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html
I should be able to launch my app because the following condition is met:

The app is installed in /Applications and the app bundle and all contents are owned by root.

When launching the app, I get the following error:

"The application “MyApp” could not be launched because it is corrupt."
"The operation couldn’t be completed. (OSStatus error -10827.)"

Which is, according to the same link, the error when none of the conditions have been met.
Note that I am using Mac OS X 10.8. In Mac OS X 10.7.5, I don't encounter the same issue.
Note also that I am trying to run the app "MyApp" inside a sandboxed application.
I tried using 2 builds of "MyApp", but in both builds, the issue can be replicated:

  1. Code-signed (using a self-signed certificate)
  2. Not code-signed

What seems to be the problem? Am I missing something?

OS X Mountain Lion (10.8)

Posted on Apr 23, 2013 6:50 AM

Reply
2 replies

Apr 24, 2013 7:30 PM in response to etresoft

Yes, but it also says in the apple documentation that:

A sandboxed app is allowed to launch a helper using Launch Services if at least one of these conditions has been met


Even if I did not pass the condition:

Both the app and helper pass the Gatekeeper assessment. By default that means both are signed by the Mac App Store or with a Developer ID.


I am pretty sure that the following condition has been met:


The app is installed in /Applications and the app bundle and all contents are owned by root.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Cannot launch another application in Mac OS X 10.8 using NSWorkspace launchApplicationAtURL:options:configuration:error

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.