Reputation: 2488
I have no idea why does this error appear when doing the final run for distribution before submitting to the iTunesConnect:
/Users/Val/Library/Developer/Xcode/DerivedData/Mathematics-dzakmzlewrmgvibasvuixiwmkwwp/Build/Products/Debug-iphoneos/Mathematics.app: replacing invalid existing signature
/Users/Val/Library/Developer/Xcode/DerivedData/Mathematics-dzakmzlewrmgvibasvuixiwmkwwp/Build/Products/Debug-iphoneos/Mathematics.app: CSSMERR_TP_NOT_TRUSTED
Command /usr/bin/codesign failed with exit code 1
All of my certificates/profiles were made 2 minutes ago.
I read from another question that I should remove unneeded spaces from info.plist but there are no such!
I should note that I am running Xcode 4.1, reinstalled today.
Upvotes: 0
Views: 2847
Reputation: 2268
I had the same problem, I solved it using just Build Active Architecture Only
option in the project info.
Upvotes: 0
Reputation: 290
There is no single answer to this problem, partly because Apple's error message(s) is/are not terribly specific.
For my case the solution was this:
Open this Perl script:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication
and insert this line near the top, like right after the "my $xxxx" declarations:
$ENV{CODESIGN_ALLOCATE} = '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate';
Credit to http://loopingrecursion.com/index.php?t=codesign for this answer.
The problem seemed to arise after installing some XCode 4.2 beta 7. I eventually uninstalled that one and reinstalled 4.1 from scratch but still couldn't Validate or Share, until I employed this fix.
Upvotes: 1
Reputation: 431
CSSMERR_TP_NOT_TRUSTED Command /usr/bin/codesign failed with exit code 1
Yes, open Keychain.app & the Distribution Certificate, change the trust to "use system default.
Upvotes: 3