iOS error “Embedded binary is not signed with the

2019-01-14 21:10发布

问题:

Those are my first steps in IOS applications development and I'm facing some problem that I can't figure out.

error: Embedded binary is not signed with the same certificate as the parent app. Verify the embedded binary target's code sign settings match the parent app's.

    Embedded Binary Signing Certificate:    Not Code Signed
    Parent App Signing Certificate:         iPhone Developer: Emil Adz (9QNEF95395)

I can't understand, what is a Embedded Binary Signing Certificate?

I went over the questions with the same error here, but none of them was related to the problem presented here (Not Code Signed).

I tried to revoke my certificate from the Apple Developer Member Center and request another certificate, but the issue persists.

Does some know how it could be fixed?

回答1:

The embedded binary is referring to a widget that you are deploying alongside with your app.

In your case, you are not signing your widget with any Signing Identity (since your error says "Not Code Signed").

To resolve this, go to your Project file, find your widget's target, and under the Build Setting tab, find the Code Signing Identity value. Choose the same code signing identity that you are using for your main app's target.

You will also need to create and configure a provisioning profile specifically for your widget when you want to release it.



回答2:

Sometimes none of the solution on Stackoverflow works. In that case,

Solution

  1. Make sure that there is no red mark/issue in any of the sections of Signing(Debug), Signing(Release) and Enabled capabilities in both of MainApp and EmbeddedApp
  2. Make sure that both certificates and provisioning profiles are installed under login/system keychain.

  1. Make sure that your certificate is never ever set as Always Trust. Access must be kept as Use System Default



回答3:

It seems this issues appears in xcode 10 and the resolution is different from the aforementioned.

I was able to fix (or rather bypass) the error by setting the Build System to Legacy (via File > Workspace Settings)

Another interesting thing to note is that the signing error would not occurr if I was building to an actual device (i.e. before changing the Build System to Legacy). It would only occurr when building using the simulator and only on Xcode 10 beta 3, 4 and 5.

Link to the original thread: https://forums.developer.apple.com/thread/105537



回答4:

This error is also shown when deployment target of your Today extension is newer than the parent app. They must be the same.

I have iOS app set to 10.0 and added Today extension which was automatically set to 11.4 as the latest. This caused the error to appear. Simply changing the Deployment target of the extension target to 10.0 resolved the issue.



回答5:

I got this error when the App Groups weren't set up correctly on all my App IDs in the Developer Portal. Therefor the App Groups in the app didn't work correctly and the Binary for the extension or the Watchkit app couldn't be signed.



回答6:

Oddly enough, I had to remove the products folder from my project in order to fix this error. Xcode crashed then, after reopening, worked like a charm!



回答7:

I got this error after adding a Copy Files Build Phase to the main app Target.

Copy Files
Destination: Absolute Path
Path: /Applications
File: MyApp.app

This worked the first time I ran the app.

On subsequent runs, Xcode began complaining about the certificate mismatch.

Removing the Copy Files build phase fixes the certificate mismatch. I'm still searching for a way to Copy Files without the error.

Same issue links:

  • https://stackoverflow.com/a/32802258/1265393
  • https://forums.developer.apple.com/thread/102707
  • https://github.com/Bouke/SwiftInitializerGenerator/issues/6


回答8:

I was having this issue when I migrated to Xcode 10 and managed to fix it by updating the architectures in "Build Settings"> "Valid Architectures" for the Watch target to

$(ARCHS_STANDARD)

This thread helped me out a lot: https://forums.developer.apple.com/thread/107563



回答9:

I got this error while having another compile time error in my code.

My new target has never been built before.

So I thought I'll fix this error first. But it turned out, that fixing the other error enabled Xcode to build the target and fix the other error itself.