iOS codesign verification failed while upgrading t

2019-06-01 05:13发布

问题:

According to my Jenkins building log, I was sure that the following raised while my OS X upgraded to 10.9.5. + /usr/bin/codesign --verify -vvvv /Users/dobbymini/jenkins/workspace/DobbyBuild/build/Archive.xcarchive/Products/Applications/Dobby.app Program /usr/bin/codesign returned 1 : [/Users/dobbymini/jenkins/workspace/DobbyBuild/build/Archive.xcarchive/Products/Applications/Dobby.app: resource envelope is obsolete ] Codesign check fails : /Users/dobbymini/jenkins/workspace/DobbyBuild/build/Archive.xcarchive/Products/Applications/Dobby.app: resource envelope is obsolete

I've found the official document OS X Code Signing In Depth mentioned that it was related to the issue of 'version 2 signa'

Note: It is necessary to sign code while running OS X Mavericks to get a version 2 signature. The actual code signing machinery is part of the operating system, not the codesign tool. It will not work to copy the codesign tool from Mavericks to an older OS X version.

Apparently my OS version is high enough to have the version 2 signature. so there should be something wrong as mentioned by this document

Structure your bundle according to the expectations for OS X version 10.9 or later:

Only include signed code in directories that should contain signed code.

Only include resources in directories that should contain resources.

Do not use the --resource-rules flag or ResourceRules.plist. They have been obsoleted and will be rejected.

The question is, I have not much idea about the limitation above. Would anybody kindly help to provide some example? This code changed I found should be for the 3rd item above. https://github.com/maciekish/iReSign/commit/37b11a43c50afb8e94ca8b2fda192f23d39e7bf3

回答1:

This is an issue with Mac OSX 10.9.5 and later. Apple will fix this in future release.

Please see my comments for xcodebuild - codesign -vvvv says"resource envelope is obsolete"