加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – 代码签名资源规则路径在Jenkins上失败,CODE_SIGN_RESOURC

发布时间:2020-12-15 01:44:01 所属栏目:百科 来源:网络整理
导读:我很少关心人们如何对待以下问题. 基本上它听起来像“使用ResourceRules.plist在Jenkins上构建失败:无法读取资源” 我的情况是: 1)jenkins 2)本地我在Xcode 7 beta工作(在一个单独的分支) 3)我的队友在6.4.1工作,对他们来说一切正常 4)Jenkins slave安装了
我很少关心人们如何对待以下问题.

基本上它听起来像“使用ResourceRules.plist在Jenkins上构建失败:无法读取资源”

我的情况是:

1)jenkins

2)本地我在Xcode 7 beta工作(在一个单独的分支)

3)我的队友在6.4.1工作,对他们来说一切正常

4)Jenkins slave安装了Xcode 6.4.1

有些人会说“这个问题被问了几百万次”,如here,here,here,here.

但documentation说如下:

Resource Rules

Systems before OS X Mavericks v10.9 documented a signing feature (–resource-rules) to control which files in a bundle should be sealed by a code signature. This feature has been obsoleted for Mavericks. Code signatures made in Mavericks and later always seal all files in a bundle; there is no need to specify this explicitly any more. This also means that the Code Signing Resource Rules Path build setting in Xcode should no longer be used and should be left blank.

所以我的问题是为什么每个人都可以快速绕过,破解,解决这个问题,当文档明确说明应该是空白的并且它已经过时了?

这背后的真正问题是什么?为什么构建失败了几年不需要的东西?

解决方法

我有同样的问题. Dan Cutting here先生建议的解决方案适合我.

为了节省一些时间,我们需要从网络链接.

“从小牛队开始,签名应用程序时不应包含资源规则选项,但由于某种原因,脚本仍将此选项传递给代码签名工具.

解决方法是更改??PackageApplication脚本,使其不再执行此操作(这将需要sudo访问权限).脚本的第155行构造参数以传递给代码签名者,因此我们可以简单地删除对resource-rules的引用:

//Remove - Begin
    - my @codesign_args = ("/usr/bin/codesign","--force","--preserve-metadata=identifier,entitlements,resource-rules",-   "--sign",$opt{sign},-   "--resource-rules=$destApp/ResourceRules.plist");
//Remove - End

//Add - Begin
    + my @codesign_args = ("/usr/bin/codesign",entitlements",+   "--sign",$opt{sign});
//Add - Starts

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读