Xcode gives me this warning when I build the app for release.
Application failed codesign verification. The signature was invalid, or it was not signe
My problem was that the Archive scheme did not have Build Configuration of App Store, but of Release. To change this, go to Product -> Edit scheme, select Archive on left side and change Build Configuration to App Store. I am assuming the code signing is configured properly (with distribution certificate).