helper app error "embedded binary not signed with the same certificate as parent app"

Whenever I try to build my helper app, it fails with the error "Embedded binary not signed with the same certificate as parent app", however when I try to build it again, it works. This isn't really a problem for testing and prototyping, however when I try to make an archive of the app, it always fails, even though both apps are signed with the same certificate. I've tried getting it to work with automatic signing on and off, and while the main app builds flawlessly, the helper app still doesn't work. The only difference in the signing section of the app is the bundle identifier, which is just [mainapp]-helper (and also the "info" section but that shouldn't matter)

In the build log, it also says

Embedded Binary Signing Certificate:	Not Code Signed
Parent App Signing Certificate:		Apple Distribution: [my name] (my team id)

even though the helper app is signed.

Are you building the helper app with an Xcode target in the same project? Or embedded an existing binary that you built somewhere else?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Both of the apps are in the same project with automatic signing.

That should just work. I suspect there’s something else wonky in your project that’s triggering the problem you’re seeing. Try looking in your build settings for any code signing settings that are out of place.


I just tried this here in my office:

  1. Using Xcode 13.4.1, I created an app from the macOS > App template.

  2. In Signing & Capabilities, I removed the App Sandbox capability. If your app is sandboxed, that complicates matters. Let me know in that case.

  3. In the same editor, I confirmed that:

    • “Automatically manage signing” was set
    • My team was selected in the Team popup
    • The Bundle Identifier was com.example.apple-samplecode.Test713046
    • Signing Certificate was set to Development
  4. I chose New > Target and selected the macOS > Command Line Tool template.

  5. In Signing & Capabilities, I set the Bundle Identifier field to com.example.apple-samplecode.Test713046-helper.

  6. In the Build Phases editor of the app target, I added the helper tool target as a dependency.

  7. I added a Copy File build phase.

  8. I set the name to Embed Helper Tools.

  9. I set the Destination popup to Executables.

  10. I added the tool to the list.

  11. I confirmed that Code Sign On Copy was set.

  12. In the helper tool target build settings, I enabled Skip Install.

  13. I selected Product > Archive; the app built for distribution just fine.

  14. In the Xcode organiser, I clicked Distribute App and went through the Developer ID > Export workflow. That also worked just fine.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

App sandbox doesn't seem to cause any issues, as I had it enabled before and even after removing it nothing changed, however you mentioned something about "Code sign on copy" being set which may be the cause of my problem, as it's not set to anything and I don't know what to set it to (this would also make sense because in the error it says that the helper app isn't codesigned, when in my settings it should be)
Whenever I try to set "code sign on copy" to anything, it doesn't change as if rejecting my input, so I don't know what to do here.

Accepted Answer

I solved the problem by deleting the "copy files" phase that I had in my helper app, and instead putting it in my main app. Now the app builds and archives perfectly!

helper app error "embedded binary not signed with the same certificate as parent app"
 
 
Q