One of reason (from many other possible as googled) why archive is added to "Other items" is that Xcode does not know CFBundleVersion/CURRENT_PROJECT_VERSION. But it is not easy as always in Apple world. Anyway I had CFBundleVersion in Info.plist Xcode did not see/used it. See details below.
After upgrade from Xcode 13.2.x to 13.4.x my app archive started to show in organizer in section "Other items" not in "iOS apps". Also in organizer app has empty version. Build to iPhone was working, build on simulator failed due to error, that I do not have CFBundleVersion
in Info.plist - but I had it there. I had fixed number (not variable) and it is root of problem. I had to change static values to variables....
File Info.plist
// OLD incorrect
<key>CFBundleVersion</key>
<string>345</string>
<key>CFBundleShortVersionString</key>
<string>1.2.3</string>
// NEW correct
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
File project.pbxproj
...
CURRENT_PROJECT_VERSION = 345;
MARKETING_VERSION = 1.2.3;
...
And additionally I had to add variables to file project.pbxproj
to Release and Debug sections because I did not have it there. So with older Xcode it was working this way and versions was taken from Info.plist
. Now it seems that source of true are variables from project.pbxproj
but Apple have incorrect error messages because it is fail to say in error that CFBundleVersion
is missing in Info.plist when it is there. Finally Xcode automatically deleted CFBundleVersion and CFBundleShortVersionString from Info.plist.
I have spent many many hours of finding out what is problem. I hate upgrading Xcode - nightmare, many hours always lost.