Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac OS Sandbox: Launching main application from helper

I have create in sandbox, an app which use a helper to start at login, as presented here.

It works ok, but the next messages are logged in the console:

lsboxd[1560]: Not allowing process 15208 to launch "/Applications/SandboxApp.app/Contents/Library/LoginItems/SandboxHelper.app" because it has not been launched previously by the user

lsboxd[1560]: Not allowing process 15208 to register app "/Applications/SandboxApp.app/Contents/Library/LoginItems/SandboxHelper.app" for launch.

I see that this messages are about the helper, but I don't know what to do, to prevent them.

My only concern is that Apple may reject the app because of this messages.

Is someone who prevent the raise of those sandbox messages, or is someone who sent an app, which raise sandbox messages, to Apple and was accepted on Appstore?

like image 277
usain Avatar asked Oct 19 '12 09:10

usain


2 Answers

See http://blog.timschroeder.net/2012/07/03/the-launch-at-login-sandbox-project/ - according to this it is a code-signing issue that probably won't be an issue with the AppStore build as the AppStore build gets resigned.

like image 105
Charlie Monroe Avatar answered Oct 11 '22 18:10

Charlie Monroe


This should work in the final build. According to Apple Documentation (Section “Launching Helpers with Launch Services”):

Launching Helpers with Launch Services

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

  • 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. Note: This does not include your development ("Mac Developer") or distribution ("3rd Party Mac Developer Application") signing identities.
  • The app is installed in /Applications and the app bundle and all contents are owned by root.
  • The helper has been (manually) run at least once by the user.

The first and/or second one should cover your case when your app was installed through the Mac App Store.

like image 44
Marc Liyanage Avatar answered Oct 11 '22 16:10

Marc Liyanage