Xcode - 捆绑格式无法识别、无效或不合适

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/37720234/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:52:37  来源:igfitidea点击:

Xcode - Bundle format unrecognized, invalid, or unsuitable

iosxcodeadmob

提问by dwinnbrown

Ok so I have just about managed to get to this point on my own but am now having some issues code signing the app specifically with the AdMob framework. I am getting this error: Command /usr/bin/codesign failed with exit code 1the details it are giving are as follows: Applications/MyApp.app/Frameworks/GoogleMobileAds.framework: bundle format unrecognized, invalid, or unsuitable

好的,所以我刚刚设法自己做到了这一点,但现在我遇到了一些问题,专门使用 AdMob 框架对应用程序进行了代码签名。我收到此错误: Command /usr/bin/codesign failed with exit code 1它提供的详细信息如下:Applications/MyApp.app/Frameworks/GoogleMobileAds.framework: bundle format unrecognized, invalid, or unsuitable

I have read the other posts on the site and tried many different ways of fixing this. If I untick 'Code Sign On Copy' the archive builds successfully but then fails on validation with a match error. This is how I have my frameworks set up currently: enter image description hereAny help would be much appreciated!

我已经阅读了网站上的其他帖子,并尝试了许多不同的方法来解决这个问题。如果我取消选中“代码签名复制”,则存档会成功构建,但在验证时失败并出现匹配错误。这就是我目前设置框架的方式: 在此处输入图片说明任何帮助将不胜感激!

回答by digitalHound

I saw this same issue with a different framework.

我在不同的框架中看到了同样的问题。

The solution for me was removing the framework from the 'Embedded Binaries' section and only adding it to the 'Linked Frameworks and Libraries' section in the target 'General' tab.

我的解决方案是从“嵌入式二进制文件”部分中删除框架,只将其添加到目标“常规”选项卡中的“链接框架和库”部分。

enter image description here

在此处输入图片说明

回答by Cue

I had a similar problem but with a different framework. The solution for me was to make sure that the framework was present in these three places:

我有一个类似的问题,但有一个不同的框架。我的解决方案是确保该框架存在于以下三个位置:

General tab:

常规选项卡:

  1. Embedded Binaries
  2. Linked Frameworks and Libraries
  1. 嵌入式二进制文件
  2. 链接的框架和库

Build Phases tab:

构建阶段选项卡:

  1. Embed Frameworks
  1. 嵌入框架

回答by Rakshitha Muranga Rodrigo

In Xcode 11.*

在 Xcode 11.*

Target -> General -> Linked Frameworks and Libraries
change related framework with option "Do Not Embed"

Else Check on the :

其他检查:

Target -> Build Phase -> Link Binary With Libraries
Check status with Required/Optional - try it with required first.