Always 'Ad Hoc Code Signed' for Embedded Binary Signing Certificate

Jason Lee picture Jason Lee · May 7, 2015 · Viewed 8.3k times · Source

I have two targets, the main target & an extension target. Now when I'm trying to archive the app, Xcode failed with the following error:

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:    - (Ad Hoc Code Signed)
        Parent App Signing Certificate:     iPhone Distribution: ***. (EAA28CVMQM)

So I checked the Build Settings - Code Signing again and again to ensure Embedded binary is signed with the same certificate as the parent app,

enter image description here

enter image description here

Or settings like below :

enter image description here

They all failed into the same reason. No matter how I change the Code Signing settings, the Embedded Binary Signing Certificate is always (Ad Hoc Code Signed).

Before this post, I've read these links:

Xcode6:Embedded binary is not signed with the same certificate as the parent app

Embedded binary is not signed with the same certificate as the parent app yet they are identical

http://aplus.rs/2014/embedded-binary-is-not-signed-with-the-same-certificate-as-the-parent-app/

https://developer.apple.com/library/ios/technotes/tn2407/_index.html#//apple_ref/doc/uid/DTS40014991-CH1-VALIDATION_ERRORS-EMBEDDED_BINARY_S_BUNDLE_IDENTIFIER_IS_NOT_PREFIXED_WITH_THE_PARENT_APP_S_BUNDLE_IDENTIFIER_

Thanks for any help.

Answer

Jason Lee picture Jason Lee · May 8, 2015

Believe it or not!!!!!!!!!!!!

It's the Apple Worldwide Developer Relations Certification Authority, if I choose always trust, Xcode archives failed. When I changed to system defaults, Xcode archives successfully.

Bloody h...