According to the Developer Guide PDF dated 2012-06-13, after the status of our application is “Waiting for Upload,” we are to use Application Loader to upload our binary. However, the Product > Archive and submit process through Organizer still works. This process through Archive is way easier and faster than the App Loader process. But here is the App Loader procedures to follow if you want to take those steps.
Here are the Application Loader instructions online: https://itunesconnect.apple.com/docs/UsingApplicationLoader.pdf
“Waiting for Upload” status
Make sure in your Developer account online that the status of your app is “Waiting for Upload.” This means that you’ve filled in all required fields, including text and images.
Build the Project
1. In Xcode 4.3.2, make sure your Scheme is “iOS Device” (it should not show your device name, which it will if it is plugged in), and perform a Product > Build.
2. Then in the left-hand column showing the project resources, click on Products to show the app file.
3. Right-click on the app file name in the Products folder and select Show in Finder. Note the exact location of that file, because you’ll need to drill down to it in Application Loader. In my case, for Xcode 4.3.2, it was built in:
Macintosh HD/Users/Steve/Library/Developer/Xcode/DerivedData/[appname]-[string of letters]/Build/Products/Debug-iphonesos/ (Click on Finder’s Go > Enclosing Folder to get the next hierarchy’s folder.)
Yet when I started from Macintosh HD and drilled back down, I did not see the /Library folder in /Users/Steve. Let’s resolve this in the next step.
Showing the /Library folder
1. In Mac OSX Lion, the folder is hidden by default, so we have to unhide it. Open the Terminal application (I used Spotlight to search for it, though it’s also in Launchpad > Utilities) and copy/paste this in, then hit Enter:
chflags nohidden ~/Library/
2. Quit the Terminal app and drill down again in Finder. The Library folder will be there. (Tip from http://osxdaily.com/2011/07/04/show-library-directory-in-mac-os-x-lion/)
3. Drill down to the location in Finder and delete all the previous versions of the file within /DerivedData to make the correct version easier to select in App Loader.
4. Right-click on the app file in /Debug-iphoneos (not the file ending in .app.dSYM, which is used for crash log symbolication), and select Compress [app name]. This will create a zipped version of the file. This file will be sent through the App Loader. I had originally found my files grayed out in the App Loader, and that’s because I had missed this compression step.
Application Loader steps
1. Open the Application Loader file (I used Spotlight to search for it). Application Loader starts up and shows several buttons to choose. Select Deliver Your App.
2. “Choose an application” screen: Select the application you want to submit. Wait for the app icon to appear. Click Next.
3. “Application Information” screen: Is the information correct? Then click Choose… then drill down to the folder you noted in the Build the Project step. Choose the .zip file.
4. “Adding application…” screen: Verify the file is correct, and hit Send. Either the file will be uploaded successfully, or you will get a message showing an error in the process. If so, you will need to correct the issue and start the app loader from the beginning. Make sure you delete the older zip file so you won’t submit it by accident.
If the error shows any code signing problems, I recommend you check it against this extremely detailed document on identifying and fixing code signing problems: https://iphonedevlog.wordpress.com/2011/09/24/code-signing-issues-apple-tech-note/
Helpfully, after you make any fixes and go to select it again in App Loader, App Loader will automatically show the last folder you opened, so you’ll pick out the folder more quickly.
You are done.
Now I’m going to be upfront with the lazy screwups I made with this app, which generated errors with each submission (the fact that the code signing error text was repeatedly the same did not help – “Application failed codesign verification. The signature was invlid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certificate”). The code signing document linked to above steered me in the right direction.
Blunder: I forgot to add my Distribution Certificate to the app’s Code Signing Identity > Release row. I went online, created and downloaded the Distribution Certificate (which had expired), and double-clicked on the file in Finder. The Organizer window popped up and showed the file as Valid Profile. I added the file to the Project and Targets settings in Xcode. I did another Product > Build. I had taken it for granted that it was already there.
Screwup: I went back to the Apple Developer iTunes Connect page and double-checked and found the Developer Profile Certificate box was unchecked. I fixed that and downloaded again.
Mistake: This was a universal app, so I could no longer select 4.0 as deployment as I was wont to do for my earlier iPhone apps. I upped it to 4.3 to include the iPad.
Just in case: In Window > Organizer > Library > Provisioning Profiles, I found several versions of my app’s provisioning profiles, some saying “Profile as expired” and “Valid signing identity not found.” I deleted those and made sure the ones remained said “Valid profile.” I went back to the Xcode Project and Target settings and made sure the right profiles were selected.