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.