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

前端 未结 13 1304
旧巷少年郎
旧巷少年郎 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:38

    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.

    0 讨论(0)
  • 2020-12-01 10:39

    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.

    0 讨论(0)
  • 2020-12-01 10:39

    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.

    0 讨论(0)
  • 2020-12-01 10:41

    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
    0 讨论(0)
  • 2020-12-01 10:42

    I was getting this error trying to build a WatchOS app in Xcode 11 - I tried all the various suggestions in this and other SO posts but the thing that finally worked was switching Xcode to use the legacy build system.

    Go to: File | Project (or Workspace) Settings | Build System

    And select Legacy Build System

    0 讨论(0)
  • 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!

    0 讨论(0)
提交回复
热议问题