34

I am trying to submit an App to iTunes Connect using the Archive option. Building for a Generic iOS Device it usually shows up under iOS Apps in the Organizer. However, now it shows up under 'Other Items' without a version and idea tidier.

The last time I did a build is the 28th of October, and I don't know of anything that can have caused this apart from the addition of the ADAL Xcode project (as a project) and small bug fixes I performed.

The reason I added the ADAL Xcode project to my App Project that when just including the Framework it didn't work in the Simulator. Adding the Framework builds it correctly.

But even now when removing the ADAL project and added the old pre-build framework it still ends up under Other Items. Any pointers what could have caused this? I am using Xcode 9.1.

Kerberos
  • 4,036
  • 3
  • 36
  • 55
Luuk D. Jansen
  • 4,402
  • 8
  • 47
  • 90
  • 2
    FYI, I fixed this issue by this solution: https://stackoverflow.com/a/10727504/4837103 – Chandler Nov 12 '17 at 10:18
  • This happened to me after I had an upload get rejected. In the end I had to delete the Derived folder, shut down Xcode, start it up again, then Archive. – David H Oct 06 '20 at 14:06

18 Answers18

25

For all your framework or auxiliary component projects (if any), set Skip install to YES. Then, set Skip install to NO for the main project target. Finally, under Build Phases for any framework projects, under the Headers section, drag and move any files under Public to Project.

Try archiving again after all these steps.

For example, if you have a macOS app that depends on a couple of frameworks, a privileged helper tool, and a command-line tool, all of which are included inside the main application bundle, then you should set Skip install to YES for all those secondary components. Otherwise, when you go to create an archive for the main app, Xcode will want to create a combination archive for all of those secondary components to be installed separately alongside the app itself.

NSGod
  • 22,699
  • 3
  • 58
  • 66
Bijoy Thangaraj
  • 5,434
  • 4
  • 43
  • 70
  • 2
    This is the only answer that really described `skip install` - all others told me to set it to `YES`, but this clarified that the main target needs to be set to `NO`. I had only 1 target and it was set to `YES`, which was my only issue. – Coltuxumab Apr 28 '20 at 10:54
  • 1
    +1 I have a workspace structured with a Main project, a Modules project and a Pods project. I added a target for Unit Tests in the Modules project, setting **Skip Install** to **No** did the trick. – Romano Mar 22 '21 at 09:03
  • 1
    It was the headers issue for me. Wow, been tearing my hair out for 2 days, thank you. – raeldor May 04 '21 at 02:43
23

The problem for me was that I set the "Skip Install" in the "Build Settings" of the Watch App target to "No". The problem was solved once I changed that to "Yes" enter image description here

RawMean
  • 8,374
  • 6
  • 55
  • 82
  • PSA: This could work, however please first understand what "skip install" does before applying it into your project – tomacco Feb 23 '21 at 11:22
9

We had same issue with our iOS application. After wasting some time for random actions, we compared broken archive with one of the older ones. All of them usually are here:

~/Library⁩/Developer⁩/Xcode⁩/Archives⁩

It turned out that newer archive contained a couple of extra subfolders in Products, while older versions had just Applications there.

That was a side effect of another change in build configuration, so we fixed it.

stepio
  • 865
  • 2
  • 9
  • 22
  • 1
    This hint helped my colleague to find the real root-cause, which was in his refactoring of the project structure and build configuration. In short: there were a couple of extra files and folders as extra build resources, which were included to the archive and made Xcode think that it's not iOS application anymore. As these files and folders were just unnecessary legacy, we simply removed them. – stepio Feb 24 '19 at 20:37
  • 3
    In short: If you package something else with your app, set the `Skip Install` build setting to `YES` –  May 07 '19 at 13:39
  • Thank you for this answer. I had accidentally added something to Copy Files in Build Phases for the target I was trying to archive. This resulted in an image being added to the archives Product folder. In short check YourTarget > Build Phases > Copy Files and make sure nothing you don't want is there or it will be added to the archive's Product folder. – Christopher Larsen Jan 23 '21 at 21:40
8

For those googling– we had the same issue as above. Turns out whenever the archive's Products/ folder has something strange going on inside it, XCode thinks the archive isn't an iOS application. In our case, there were 2 targets being built in the same archive scheme and so 2 apps were showing up in Products/.

The way to fix this was to click the target on the top left (next to > Generic iOS Device) then go to Edit Scheme > Build > Removing the duplicate targets from there and leaving only a single one.

Another way to fix this is to set the Skip Install to YES for a target to not install it into the archive (see @RawMean's answer above).

Hope this helps someone save some grief.

hurshagrawal
  • 663
  • 6
  • 15
  • 1
    That's right. That situation can happen when you duplicate schemes using "Manage Schemes" editor. Your solution resolves that +1 – Michael Aug 14 '19 at 11:40
  • Beautiful answer! For anyone that made multiple targets (dev, prod) by right clicking the main target and duplicating it will NEED to do this to archive and distribute. – barrylachapelle Sep 03 '19 at 17:13
  • After couple of hours of trying and failing, this finally saved me! – Michal Šrůtek Jul 20 '21 at 13:25
8

For easy understanding, just follow the image and delete the duplicate target from the selected Scheme.

Click the target on the top left (next to > Generic iOS Device/List of the simulator) then go to Edit Scheme > Build Removing the duplicate targets from there and leaving only a single one.

Remove Duplicate Target

halfer
  • 19,824
  • 17
  • 99
  • 186
Harjot Singh
  • 6,767
  • 2
  • 38
  • 34
4

Another issue I ran into using Xcode 11.4, my app archive was also ending up in Other Items. After scrubbing back and forth through git history, I found the issue (as weird as it is) and solution.

Info.plist had the Bundle version string set to $(MARKETING_VERSION), but after changing it to the raw version number 1.0.7 then the app was correctly archived to the iOS Apps list.

4

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.

mikep
  • 5,880
  • 2
  • 30
  • 37
  • In Xcode 14 (with old project), I had same problems, but slightly different behavior: 1- The build appears with version but not build number. 2- You can validate, but if you distribute then you get an error, and it fails. The error was unhelpful: "The provided entity includes a relationship with an invalid value " is not a valid id for the relationship 'build' (ID: 63a4a5d-8716-4c6-983f-7455d00a6081)" – benc Feb 22 '23 at 21:16
0

In my case I had to remove old archives, then remove my app target and create it again, run pod install, after this I was able to submit my app to AppStore, and app moved from "Other items" to "iOS Apps".

landonandrey
  • 1,271
  • 1
  • 16
  • 26
0

In my case problem was I don't have a path for my Info.plist in my project settings for a release build. Build Settings > Packaging > Info.plist File.

Wrong enter image description here

Correct enter image description here

Dima Portenko
  • 3,443
  • 5
  • 35
  • 48
0

If you've been able to build successfully recently and none of the other answers are applicable, you may need to reboot your machine. Cleaning, pod install, restarting Xcode, checking the scheme and build settings all had no impact.

With no other changes, my project built successfully after a reboot under Xcode11.

Ben
  • 1,117
  • 13
  • 21
0

I faced with this problem.. whenever I archive it is listed in other items not in aps... and I reliaze the app name were different... I edit schme name to orjinal one and problem fixed

Ucdemir
  • 2,852
  • 2
  • 26
  • 44
0

For me, re starting XCode was not enough. Re starting the Apple Mac fixed it. My Mac did have many applications open and was memory constrained, I assume it was related to this.

John Goodstadt
  • 678
  • 8
  • 13
0

The reason will vary from case to case but the easiest way to find out is to attempt to upload it to the App Store.

In my case the App Store reported a missing CFBundleShortVersionString which was true as I had accidentally deleted it from Release builds but was present in Debug builds.

Rivera
  • 10,792
  • 3
  • 58
  • 102
0

I faced the same issue with my React Native project after I upgrade my project.

Just simply run npm/yarn install and then pod install, then the issue gone

Ponleu
  • 1,492
  • 12
  • 27
0

I had an empty bundle identifier in my Info.plist Updating it worked for me.

Ankit Kumar Gupta
  • 3,994
  • 4
  • 31
  • 54
0

Had this issue while trying to archive an older project and none of the other answers here helped. Was building fine on debug but when I tried to archive the release generated errors which I didn't notice at first. That's why it wasn't recognized as an iOS app and resulted in it being listed as "other" instead.

After further inspection, found this answer which solved for me: https://stackoverflow.com/a/69360271/4522329

If none of the other answers here have helped, make sure to build under release and check for errors. In my case had to update settings, convert to latest swift version and adjust build settings to match compatibility with current version of Xcode.

Mercutio
  • 1,152
  • 1
  • 14
  • 33
0

My marketing version was blank for the build configuration I was trying to archive for (I created a custom staging build config). Setting the value for Marketing Version > Staging to 1.1.0 fixed it for me marketing version location

Johnnybib
  • 219
  • 2
  • 9
0

For me the error occured, after I enabled Build Documentation During 'Build', by following this article. Turns out that on release, the documentation will be exported together with the app archive, making XCode not recognize the scheme anymore.

After disabling Build Documentation During 'Build' by setting it to NO, the archive was recognized again.

Throvn
  • 795
  • 7
  • 19