Uploading archive error: "Missing iOS Distribution signing identity for ..."

I'm trying to upload my iOS app archive to iTunes Connect using Xcode, but when I click "Upload to App Store" I get the error: Xcode attempted to locate or generate matching signing assets and