Xcode 6 error: “Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier.”

后端 未结 20 1304
孤独总比滥情好
孤独总比滥情好 2020-12-08 01:45

I\'m trying to build an extension project and Xcode keeps throwing the error in subject.

\"Xcode

相关标签:
20条回答
  • 2020-12-08 02:08

    It might have happened that you duplicated your targets to do a clone app. For instance you selected each of your targets and duplicated them. When you cloned your watchkit extension target its target membership could be automatically assigned to the original watch app.

    To fix this, you would need to go to yours original "WatchKit extension.appex" file in Project Navigator and unselect Target Membership in File Inspector for your new clone watch app target. You should do the opposite for your duplicated "Watchkit extension-copy.appex" and make sure it has only duplicated "watch app-copy" target selected there.

    0 讨论(0)
  • 2020-12-08 02:08

    For xCode v12 I solved that problem with one click:

    TARGETS -> Build Phases -> Embed App Extensions

    and check: Copy only when installing

    0 讨论(0)
  • 2020-12-08 02:09

    This was Helpful for me:

    I was getting:

    Xcode couldn't find any iOS App Development provisioning profiles matching

    So I changed the Bundle Identifier name i.e com.example.something to com.example.something1, and then cleaned the build.

    Make sure you change all the dependant bundle id as well..njoy!!

    0 讨论(0)
  • 2020-12-08 02:14

    I just clean derived folder and it helps me in these situations.

    0 讨论(0)
  • 2020-12-08 02:15

    It looks like the bundle ID behavior changed when WatchOS 2 arrived.

    Previously I had an extension bundle identifier like this:

    com.mycompany.myappname.watchkitextension
    

    Somewhere else on Stackoverflow it was mentioned that the extension bundle identifier should be in this format, but no matter what I tried Xcode kept throwing errors at me.

    The only possible solution is changing the extension bundle identifier to:

    com.mycompany.myappname.watchkitapp.watchkitextension
    

    I am pretty sure this wasn't the case with an WatchOS 1 app. A problem because of this change is that you can't actually generate an app id for the bundle identifier com.mycompany.myappname.watchkitextension. This isn't necessary, just set all provisioning profiles in the build settings to automatic and don't forget to use the right code signing certificate for you release/ad-hoc/debug schemes.

    I actually found out that this approach works because Xcode suggested fixing the problem and this is what it did.

    0 讨论(0)
  • 2020-12-08 02:17

    I made changes like:

    Main app bundle id: com.myapp.testapp

    and

    Extension app bundle id: com.myapp.testapp.myextension

    and its works!!!

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