Jenkins vs. Xcode plugin - codesign troubles

浪子不回头ぞ 提交于 2019-11-29 02:04:52
Julius Lisauskas

Everything is ok with Jenkins plugin. Just product settings is incorrect.

Open the "Build Settings" tab of your project. Searched "Code Signing Resource Rules Path", it was empty for me. Change to: $(SDKROOT)/ResourceRules.plist

credits goes to Adams Blair who described this problem with SDK2.2

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.

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.

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 plugin 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.

There is an issue raised on the Jenkins Xcode plugin regarding this bug that concludes the bug lies in Xcrun.

pr1001

As specified in another answer, you can also just not specify the distribution certificate to sign with and it will package correctly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!