Error “No suitable application records” were found when submitting apps via xCode
When attempting to submit my application to the iOS app store recently using xCode Organizer, I encountered the following weird error message:
“iTunes Store operation failed – No suitable application records were found. Verify your bundle identifier … is correct”
After checking that the provisioning profiles are properly set up and that the same bundle identifier is created on both the iOS Developer Portal and the iTunes Connect website only to find nothing out of the ordinary, I started to suspect I just stumbled upon another xCode bug. Contrary to their consumer products which are probably built to high quality standards, Apple’s software development tools, xCode notwithstanding, have been known to be quite buggy – definitely not in par with tools from other companies, for example, Microsoft Visual Studio, which is more developer friendly and much less buggy.
In my case I have submitted applications to the App Store multiple times using Xcode Organizer with no issues. So what was so different this time round? It took me quite a while to find out – I was developing applications for another company who gave me two independent accounts, one to sign in to iOS Developer Portal and another to sign in to iTunes Connect. Since the Account panel in xCode preferences does not accept iTunes Connect account, this could explain the above error message due to inability to pull the application list. To prove this theory I tried to add my iTunes Connect account to xCode’s account list but was greeted with an error message saying that the account is not a developer account. So submitting from xCode organizer was probably out of the question.
The only option now is to export the application IPA file and submit using the Application Loader:
I must say, perhaps not surprisingly, that the Apple Application Loader is among the lousiest developer tools I have ever seen. It allows user to run multiple instances of its on the same machine and can be quite unstable at times. Nevertherless, clicking on Deliver Your App and submitting my IPA file now worked fine and I can proceed with releasing my application for user to test via TestFlight!
So the problem I encountered was definitely an xCode bug which wasted me almost half a day to figure out. It would have been more helpful if xCode could prompt user to log in again if their account does not have enough permissions for iTunes Connect, or if the error message could just be more specific. Either way, xCode has never been known to be developer-friendly and this is probably just something xCode developers have to live with.
On a side note, if you attempt to build your code on a machine without valid provisioning profiles, and xCode offers to fix the issue for you like in the following screenshot …
…. do not ever agree to let xCode automatically “fix” the issue! Although it may seem to work at first, the resulting sets of private keys / certificates / profiles will be a mess and quite a challenge to clean up or to migrate to a different computer. Simply log on to the iOS Developer Portal and follow the instructions to generate the profiles yourself – it will be cleaner and easier to troubleshoot if something goes wrong. Shoud you decide to let xCode fix the issue on your behalf, it will create a set of provisioning profiles beginning with XC (e.g. XC Ad Hoc …) on the developer portal, and attempt to sign the application with this profile:
If another developer on the developer team also creates a release profile for the same bundle identifier, the created profile will bear the name entered by the developer, not the name auto-generated by xCode and you will have two release profiles for the same application, which can be quite confusing. To avoid this, I just spend some initial efforts to manually create the necessary profiles and keep things simple to avoid having to deal with possible xCode bugs that may arise.