“Upload to App Store” hangs on “Stuck on Authenticating with iTunes Store”

Fix for the Xcode "Stuck on Authenticating with iTunes Store" issue.

Posted on June 6, 2017

Here’s a fix for the annoying “Stuck on Authenticating with iTunes Store” issue when uploading your app through Xcode.
Run the following in Terminal:

cd ~/
mv .itmstransporter/ .itmstransporter_OLD/ 
"/Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/itms/bin/iTMSTransporter"