Jenkins 与 Xcode 插件 - 协同设计的麻烦
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26464577/
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
Jenkins vs. Xcode plugin - codesign troubles
提问by zskalnik
I have updated to OS X Yosemite and also Xcode 6.1 (downloaded from the developer site), from this time I have had the problem with the building as in the log file I see the note "Warning: --resource-rules has been deprecated in Mac OS X >= 10.10!". Does someone know how to use Xcode plugin without "resource-rules" flag? Thank you.
我已经更新到 OS X Yosemite 和 Xcode 6.1(从开发人员网站下载),从这个时候我遇到了构建问题,因为在日志文件中我看到了“警告:--resource-rules 已被弃用”在 Mac OS X >= 10.10 中!”。有人知道如何在没有“资源规则”标志的情况下使用 Xcode 插件吗?谢谢你。
回答by Julius Lisauskas
Everything is ok with Jenkins plugin. Just product settings is incorrect.
Jenkins 插件一切正常。只是产品设置不正确。
Open the "Build Settings" tab of your project. Searched "Code Signing Resource Rules Path", it was empty for me. Change to: $(SDKROOT)/ResourceRules.plist
打开项目的“构建设置”选项卡。搜索“代码签名资源规则路径”,对我来说是空的。改成:$(SDKROOT)/ResourceRules.plist
credits goes to Adams Blair who described this problem with SDK2.2
感谢 Adams Blair,他用 SDK2.2 描述了这个问题
https://stackoverflow.com/a/7919137/2124345
https://stackoverflow.com/a/7919137/2124345
Update
更新
This solution doesn't remove the warning itself. But i'm pretty sure that warning isn't a problem. The problem is that without this setting ResourceRules.plist files isn't generated in Payload folder, and build process stops because file is missing.
此解决方案不会删除警告本身。但我很确定警告不是问题。问题是如果没有此设置,则不会在 Payload 文件夹中生成 ResourceRules.plist 文件,并且构建过程会因为文件丢失而停止。
And again, it's not related with jenkins plugin at all. Same error happens with xcrun -sdk iphoneos PackageApplication
. Jenkins just calling this command line as a build step.
再说一次,它与 jenkins 插件完全没有关系。发生同样的错误xcrun -sdk iphoneos PackageApplication
。Jenkins 只是调用这个命令行作为构建步骤。
回答by shocking
The answer provided by Julius Lisauskas will resolve the warning, but it is actually just a workaround for a bug that exists in the Jenkins Xcode pluginxcrun.
Julius Lisauskas 提供的答案将解决警告,但它实际上只是Jenkins Xcode 插件xcrun中存在的错误的解决方法。
As mentioned in Apple Technical Note TN2206:
Systems before OS X Mavericks 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.
It is thus no longer possible to exclude parts of a bundle from the signature. Bundles should be treated as read-only once they have been signed.
OS X Mavericks 之前的系统记录了签名功能 (--resource-rules) 来控制包中的哪些文件应该由代码签名密封。小牛队已弃用此功能。在 Mavericks 和以后制作的代码签名总是将所有文件密封在一个包中;无需再明确指定这一点。这也意味着 Xcode 中的代码签名资源规则路径构建设置不应再使用,应留空。
因此,不再可能从签名中排除部分包。捆绑包在签名后应被视为只读。
There is an issue raised on the Jenkins Xcode pluginregarding this bug that concludes the bug lies in Xcrun.
Jenkins Xcode 插件上提出了一个关于此错误的问题,该问题得出的结论是错误在于 Xcrun。
回答by pr1001
As specified in another answer, you can also just not specify the distribution certificate to sign with and it will package correctly.
如另一个答案中所述,您也可以不指定要签名的分发证书,它会正确打包。