The process of publishing an app from Xcode has a changed a bit with xCode 5, and if you aren't savvy to the change you could get locked into an endless circle of "no identities are available for signing", or Xcode crashes. We have broken down how to get an app to the Apple App store including the latest changes in just 9 steps;
1. Verify that you are using a distribution provisioning profile to sign the Release build of your app.
2. Build an archive, Product > Archive.
3. Open Organizer window (Window > Organizer). From the Archive section export the app for Ad Hoc Deployment. Do not choose Submit to the iOS App Store. To sign the app, choose the same distribution provisioning profile that you used for release build. Do not choose a development provisioning profile. When completed this will produce an .ipa file.
Assuming that your app is now in ready to receive application binary state from within the iTunes Connect portal, we can proceed to submit the app.
4. From Xcode menubar, select Xcode > Open Developer Tool > Application Loader.
5. Log in using your iOS Developer Program user ID and password.
6. Click Deliver Your App.
7. Select your application from the drop down. Click Next.
8. Click the Choose button and select the .ipa file you had exported in step #3.
9. Proceed to submit the app. If all goes well, the process will end in a few minutes and you will see a confirmation.
This is a simplified version taken from the full documentation in this link.