Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code signing helper apps for Apple Sandbox on OSX

I have an app I need to run at startup, and I am converting to Sandboxing.

I have a helper app created, and working fine when I do not code sign my app.

To codesign, it looks like I have to create provisioning profiles - one for the helper and one for the actual app.

Since these dont match, I cant get both to match, and am unable to have the helper app launch the main app.

I have tried to re-sign the helper:

codesign -f -vv -s "3rd Party Mac Developer Application:" -i "com.mydomain.myhelper" --entitlements myhelper/myhelper.entitlements myhelper.app

And get the error: object file format unrecognized, invalid, or unsuitable

I have re-created the helper from scratch, with no results.

How can I do this helper app and get it signed? There seems no documentation on this process.

like image 883
JeremyLaurenson Avatar asked Jul 24 '12 20:07

JeremyLaurenson


People also ask

Can you use Sandbox on a Mac?

The App Sandbox is an access control technology that macOS provides and enforces at the kernel level. The sandbox's primary function is to contain damage to the system and the user's data if the user executes a compromised app.

What is Sandbox helper on Mac?

App Sandbox is an access control technology provided in macOS, enforced at the kernel level. It is designed to contain damage to the system and the user's data if an app becomes compromised.

Does Apple have Sandbox apps?

All third-party apps are “sandboxed,” so they are restricted from accessing files stored by other apps or from making changes to the device.


1 Answers

I just had this same problem yesterday when submitting an app. I think I finally figured it out. Here's what I did:

  • Archive the app as normal
  • Right click on the archive in the organizer and select Show in Finder
  • Right click on the archive and show contents and burrow all the way down to your HELPERAPP embedded.provisionprofile and delete it.

Then from the Terminal codesign like this:

codesign -f -s "3rd Party mac Developer Application:" -i "com.company.YOUR_MAIN_APP" --entitlements YOUR_MAIN_APP_ENTITLEMENTS_PATH_IN_YOUR_PROJECT_FOLDER THE_ARCHIVED_HELPER.app_PATH

This did pass validation and let me upload. I'm waiting for review so we'll see if this worked.

like image 174
corndogcomputers Avatar answered Oct 22 '22 06:10

corndogcomputers