I started getting a code error after the certificate expired. I have an updated certificate and it expired has been deleted. But for some reason, Xcode sets EXPANDED_CODE_SIGN_IDENTITY with an expired SHA-1 certificate. Where does he get this value? I suppose it should be cached somewhere, because there is no certificate with SHA-1 in the keychain that it is trying to use to sign the code. I searched the pbxproj file and did not find it, and the recursive grep, starting from the project root, did not give any results.
Here are some details about my configuration:
- Xcode has no account
- Instead of a developer account, I use an exported certificate from a team agent
- Xcode Version - 6.1.1
- OSX Version - 10.10.2
The project ID is set in Xcode as follows:

When I check the keychain, he finds the correct person:
$ security find-identity -p code signing
Policy: Code Signing
Matching identities
1) F1326572E0B71C3C8442805230CB4B33B708A2E2 "iPhone Developer: XXX XXX (C395QGL4DK)"
In the output of the assembly, I see the wrong environment variable:
export EXPANDED_CODE_SIGN_IDENTITY=9F5616A53464FC5C003847ED620357A7BC72ABB1
I tried to fix this as follows:
- Remove certificate from Access Keychain Access and re-add it
- Define a private key access control to allow all applications
- Delete all provisioning profiles and re-add the one I'm using
- Delete everything under ~ / Library / Developer / Xcode / DerivedData li>
- Delete everything in ~ / Library / Caches / com.apple.dt.Xcode
- Restart xcode
- Reboot Mac
, . , , . , , . , . , , .
, Xcode , , .