After developing an App for two years I finally have a need to upload the App to Apple for Beta testing and find that I have a whole new level of errors to be debugged when doing an Archive/Validation. I stripped the app down so i didn't have to solve some of the harder problems to see if I could at least get a build into iTunesConnect but have run into a validation failure: "You must supply a CFBundleIdentifier for this request." I have this set in the General Section and all other places that use this refer to $PRODUCT_BUNDLE_IDENTIFIER which seems to pick it up. I put an echo statement in one of the build phase scripts to print it out but was unable to get it to print the $CFBundleIdentifier but I am not enough of an expert on shell scripting to know if I have the correct syntax. As an alternative to start fresh, I created a new project with the same name, in a different location, and tried to archive that and get the same error. This may be a problem I created for myself the first day I started developing that is only being a problem now. Help!
Archive validation failed: You must supply a CFBundlerIdentifier for this request.
Broke Apples rules and created a dummy App called TestWhyICantValidateArchive and created an app and can successfully validate after I fix some errors about not having icons. The other version of my App that I created did not get that far before giving the above error. So, I think this is an error with the App-ID in my Developers Site or iTunesConnect. The App-ID was made several years ago and the Name was not exactly the same as the ID as it had the words "XCode ios App:" in the beginning. So, I will write this up as a Bug.
Is there a way of detaching the App Record in iTuneConnect from the App-ID, delete the App-ID, and then recreate a new App-ID with the same name? My App is now being held hostage by a corrupt App-ID file, I think.
Spent the whole day trying to binary search the archive process to see what it took to get it to work but to no avail. I did notice that the Application Information for the original App did not contain a field to change the Bundle-ID or to Register a New Bundle ID but the new App TestWhyICantValidateArchive does have these fields. Like I said this is very old App in iTuneConnect that has never been used to upload a build.
From what I said previously the main point I took away was that if I built a new app and gave it a new app to point to in iTuneConnect it Archived/Validated OK. If I created a new app with the same name as the old App and pointed to the old App in ITuneConnect it gives the above error. This suggests that the only difference is which app I am pointing at. On the new App with the same name as my old App if I set the bundle ID and renamed the App to TestWhyICantValidateArchive I could get it to validate. Anything but that and I got some error about the id being wrong until I worked it completely back to the beginning and I then got the above error, sort of like who's on third. So it seems that you can not change anything about the app on iTuneConnect and you app has to access the same Application and Bundle-ID as when it was originally created.
I guess the next thing to try is to create a third App, which I am loath to do because you can't delete them. This time I will start out with the name very close to what my original name was and then use that to remake my App. This will likely kill my git history but I have to get on with this. I have never been more disappointed in Apple.