iOS error “Embedded binary is not signed with the same certificate as the parent app”

前端 未结 13 1346
旧巷少年郎
旧巷少年郎 2020-12-01 10:36

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         


        
13条回答
  •  北海茫月
    2020-12-01 10:44

    Assumptions

    • the app I am working is called TestApp (for the sake of privacy)
    • the steps below are tested in Xcode 11.1
    • the scheme I was using to compile is AdHoc
    • the app has the Push Notification capability

    Issue

    In my case the issue was caused by a discrepancy between the signing of two targets. The issue was between:

    • the TestApp target (i.e. what in the error is referred to as Parent App Signing Certificate)
    • the notificationServiceExtension target (i.e. what in the error is referred to as Embedded Binary Signing Certificate).

    Resolution

    In my AdHoc scheme, under the TestApp target, I disabled the automatic signing because I wanted to specify the provisioning profile and the certificate.

    The steps I followed were:

    1. from Signing & Capabilities -> AdHoc -> Signing (section)
      1. removed the tick from Automatically manage signing under selected
      2. selected the provisioning profile I wanted to use

    1. from Build Settings -> Signing (section)
      1. under Code Signing Identity, choose for both AdHoc and Any SDK the certificate I wanted to use
      2. under Code Signing Style -> AdHoc, chose Manual
      3. under Provisioning Profile -> AdHoc, chose the provisioning profile I wanted to use (i.e. the same as step 1.2)

    The error was thrown because I didn't apply the same settings to the notificationServiceExtension target (which was still using the automatic signing and therefore another certificate). As soon as I have repeated the steps above also for this target, the error was gone.

    I hope it can helps someone, because this error drove me crazy!

提交回复
热议问题