Pages

Friday, August 9, 2013

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?


View the original article here

0 comments:

Post a Comment