Unable to use native cestor with xcodebuild under Mavericks

I'm trying to migrate some iOS xcode build servers to use Mavericks, which is needed to build xcode 6. However, calling xcodebuild with the code used to work in the mountain lion does not seem to work anymore, and results in:

Code Sign error: No codesigning identities found: No codesigning identities (ie certificate and private key pairs) that match the provisioning profile specified in your build settings ("provision name") were found. 

Our build team is pretty standard, and the certificate is in place, making this exact code on the mountain lion “just work” (notice I added line breaks for readability and replaced some private data, such as project name and provision):

 /Applications/Xcode5.app/Contents/Developer/usr/bin/xcodebuild -project ProjectName.xcodeproj/ -alltargets -configuration Release -sdk iphoneos7.0 build PROVISIONING_PROFILE=XXXX-XXXXX-XXXX-XXXX-XXXXXXX CODE_SIGN_IDENTITY="iPhone Distribution: name of company (XXXXXXXX)" KEYCHAIN=/Users/administrator/Library/Keychains/temp.keychain OTHER_CODE_SIGN_FLAGS=--keychain /Users/administrator/Library/Keychains/temp.keychain 

I have a workaround that is signed using a “well-known working” certificate / provision and replaces it with the codeign tool after the build is complete, but this causes some side effects for users that I don’t know how to get around. As far as I can tell above, should work and may simply be missing a new argument in xcodebuild that I don't know about.

+2
source share
1 answer

Mavericks ignores the default key set when invoked:

 security default-keychain 

And the original xcodebuild validation logic ignores the keychain command line arguments!

Next command:

 security list-keychains 

The keychain will not be returned. The workaround is actually simple:

 security list-keychains -s /path/to/your/keychain 

And then the correct certificate will be found in the initial verification process.

+2
source

Source: https://habr.com/ru/post/1389537/


All Articles