xcode iOS8 动态框架 -> CodeSign 错误:SDK“iOS 8.3”中的产品类型“框架”需要代码签名

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/29836356/
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 07:03:42  来源:igfitidea点击:

iOS8 Dynamic Frameworks -> CodeSign error: code signing is required for product type 'Framework' in SDK 'iOS 8.3'

iosxcodeprovisioning-profilecodesignios-frameworks

提问by Z S

I am using the iOS8 Dynamic Frameworks that I build myself and link within my iOS app. It was working fine in the simulator and on device, but when trying to archive a Release build for it, I keep getting this error:

我正在使用我自己构建并在我的 iOS 应用程序中链接的 iOS8 动态框架。它在模拟器和设备上运行良好,但是在尝试为其归档发布版本时,我不断收到此错误:

Code Sign error: No matching provisioning profiles found: None of the valid provisioning profiles allowed the specified entitlements: com.apple.developer.ubiquity-kvstore-identifier, keychain-access-groups, com.apple.developer.icloud-container-identifiers, com.apple.developer.icloud-services, com.apple.security.application-groups, com.apple.developer.ubiquity-container-identifiers. CodeSign error: code signing is required for product type 'Framework' in SDK 'iOS 8.3'

代码签名错误:找不到匹配的配置文件:没有任何有效的配置文件允许指定的权利:com.apple.developer.ubiquity-kvstore-identifier、keychain-access-groups、com.apple.developer.icloud-container-identifiers , com.apple.developer.icloud-services, com.apple.security.application-groups, com.apple.developer.ubiquity-container-identifiers。CodeSign 错误:SDK“iOS 8.3”中的产品类型“Framework”需要代码签名

Within the app target -> Build Phases -> Embed Frameworks -> the framework is linked there, and "Code Sign on Copy" checkbox is checked.

在 app target -> Build Phases -> Embed Frameworks -> 框架链接到那里,并选中“Code Sign on Copy”复选框。

Within the framework target -> Build Settings -> I have set Provisioning Profile to "Automatic", and for Code Sign Identity, under Release, I am using "iOS Distribution"

在框架目标 -> 构建设置 -> 我已将配置文件设置为“自动”,对于代码签名标识,在发布下,我使用的是“iOS 分发”

I have 3 different app targets that need to build off this Framework.

我有 3 个不同的应用程序目标需要构建此框架。

I'm confused:

我糊涂了:

  • does the framework need it's own AppID registered in the Developer Center?

  • does the framework need it's own Provisioning Profile?

  • can the framework use the same Entitlements file from the iOS app target?

  • 框架是否需要在开发者中心注册自己的 AppID?

  • 框架是否需要它自己的配置文件?

  • 框架可以使用来自 iOS 应用程序目标的相同权利文件吗?

Thanks.

谢谢。

采纳答案by Chris Birch

I had the same problem but fixed it by:

我遇到了同样的问题,但通过以下方式修复了它:

Setting the team to None in the General tab of the target settings.

在目标设置的常规选项卡中将团队设置为无。

Changing this value seems to also reset the code signing params in the build settings, to 'iOS Developer' for both debug and release. If it doesn't then change these params yourself.

更改此值似乎还会将构建设置中的代码签名参数重置为“iOS 开发人员”以进行调试和发布。如果没有,则自己更改这些参数。

I can now build my framework with no errors.

我现在可以毫无错误地构建我的框架。

The newly built framework can be checked for signing by entering codesign --display --verbose=4 FRAMEWORK_PATHinto the terminal.

可以通过在终端中输入codesign --display --verbose=4 FRAMEWORK_PATH来检查新构建的框架是否签名。

This tool should return: code object is not signed at all

这个工具应该返回: 代码对象根本没有签名

回答by Charles A.

The framework does not need its own app ID registered in the developer center, provisioning profile, or entitlements. I have an app on the app store that contains an app target, a today extension target, watch extension targets, and a framework target for shared code.

该框架不需要在开发者中心注册自己的应用 ID、配置文件或权利。我在应用商店中有一个应用,其中包含一个应用目标、一个今天的扩展目标、一个手表扩展目标和一个共享代码的框架目标。

I was encountering this issue with a second app I was attempting to setup a build for, and I was able to resolve it by changing the signing for my framework to use automatic settings instead of "Don't Code Sign" (iOS Developer identity / Automatic profile). This causes the error to go away and the framework still seems to be resigned during the archive as one would expect. It seems that some build settings are required, even if it is just going to resign.

我在尝试为其设置构建的第二个应用程序中遇到了这个问题,我能够通过将框架的签名更改为使用自动设置而不是“不要代码签名”(iOS 开发人员身份/自动配置文件)。这会导致错误消失,并且框架似乎在存档期间仍然如预期的那样被放弃。似乎需要一些构建设置,即使它只是要辞职。

EDIT: It's worth mentioning that once you set it to automatic, you must also have a provisioning profile installed that is appropriate for the bundle id set for the targets being built (a wildcard development profile should suffice).

编辑:值得一提的是,一旦将其设置为自动,您还必须安装一个配置文件,该配置文件适用于为正在构建的目标设置的包 ID(通配符开发配置文件就足够了)。