我正在使用iOS8动态框架,我自己构建并链接到我的iOS应用程序中。它在模拟器和设备上运行良好,但在尝试为其存档Release版本时,我不断收到此错误:
代码签名错误:找不到匹配的配置文件:没有任何有效的配置文件允许指定的权利: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'
在应用目标中 - >构建阶段 - >嵌入框架 - >框架在那里链接,并且" Code Sign on Copy"复选框已选中。
在框架目标内 - >构建设置 - >我已将Provisioning Profile设置为" Automatic",对于Code Sign Identity,在Release下,我正在使用" iOS Distribution"
我有3个不同的应用程序目标需要构建此框架。
我很困惑:
框架是否需要在开发人员中心注册自己的AppID?
框架是否需要它自己的配置文件?
框架可以使用iOS应用目标中的相同Entitlements文件吗?
感谢。
答案 0 :(得分:12)
我遇到了同样的问题但通过以下方式解决了问题:
在目标设置的“常规”选项卡中将团队设置为“无”。
更改此值似乎还会将构建设置中的代码签名参数重置为iOS开发人员'用于调试和发布。如果它没有,那么你自己改变这些参数。
我现在可以构建我的框架而没有错误。
可以通过在终端输入 codesign --display --verbose = 4 FRAMEWORK_PATH 来检查新构建的框架。
此工具应返回:代码对象未完全签名
答案 1 :(得分:7)
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.
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.
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).