Xcode 10.1 doesn't show 'distribute app' option when archiving, can't archive
Asked Answered
T

11

24

I suddenly have this weird issue with Xcode 10.1.

When I archive App Store target for my app, I can't see "distribute app" option, instead it now says "Distribute Content", and neither can I export ipa nor upload to App Store directly.

My archive comes under "Other items" in Organizer instead of iOS apps.

It seems to work fine with development target though.

Here is the screen shot.

enter image description here Anyone with any knowledge about it please help.

Th answered 2/4, 2019 at 5:56 Comment(9)
Nope, the target is correct.Th
Would you please try to set Skip install to YES in build settings?Merchantman
Have you targeted any device or Generic iOS device for archiving?Merchantman
Isn't that because you are using an Enterprise Program account other than Developer Program account?Discernible
@FaysalAhmed No effect of enabling that flag and yes i selected generic iOS device.Th
@ElTomato It has nothing to do with enterprise account and I used to archive until now.Th
@ParasGorasiya Did you solve this issue ? I have also same issue at my project and I am still looking for the solution :(Sarsaparilla
@FatihAyyildiz Currently I am just following Bathem's answer(https://mcmap.net/q/551992/-xcode-10-1-doesn-39-t-show-39-distribute-app-39-option-when-archiving-can-39-t-archive). Its just a workaround, every time I have to do this troublesome thing for different scheme.Th
none of these solutions have worked for me.Ideography
C
13

Please make changes as follows

  • Change Skip install to NO

Make sure only the Application has this set to NO. Embedded Targets like Frameworks need to have Skip Install = YES

Chasidychasing answered 20/6, 2019 at 3:42 Comment(5)
In my workspace I actually had to go to my framework target and change Skip Install to YES.Speakeasy
Thanks! After trying for ages the other answers (like making skip install YES), i did this and it worked!Wymore
@AdamJohns Thank you so much! I wasted about a day working on this. Tried every suggestion. It turned out to be the framework target that needed Skip Install to YES.Stickler
@Andi's answer is what worked for me--the framework target needs Skip Install to be YES, and the app target needs to have Skip Install be NO.Partridgeberry
Thanks. This solution helped me a lot. I have a project that has one app target and 10 framework targets. So I have set Skip install to NO in the app target only and set YES to all other target.Poulos
F
4

Faced the same issue few days ago. This usually occurs when you have multiple schemes in a project.

  • Go to edit scheme (Next to stop button)
  • Select the target of which you want to archive.
  • In build option, remove other targets or you may unselect archive checkbox.
  • Re-archive
Fenner answered 2/4, 2019 at 6:32 Comment(2)
This is just a work around, if I re enable i get the issue again and I also want to archive other targets as well.Th
Thank you so much!Reuven
S
2

I ran into this annoying error today - I thought it was the new version of Xcode - but no. I had multiple targets for my project (staging/production), and also a nested framework project.

To solve this I opened the staging scheme and made sure only the checkboxes are checked for that target: (the top row was selected before)

enter image description here

Staff answered 20/4, 2020 at 12:27 Comment(0)
G
2

Thanks for the old answers, I have solved the problem by keeping "Skip install" of frameworks to false.

My XCode is with version 13.2.1. One thing special is that runner and framework in my project are in different schemes. Hope the picture will help newcomers.

enter image description here

Groenendael answered 19/5, 2022 at 18:58 Comment(0)
W
1

I have run into this situation and solved it. The solution set SkipInstall=No does not work for me.

I find the reason for my situation is that I imported a framework by adding it into Link Binary With Libraries section.

So I changed a way to import the framework.

  • Remove the framework at Link Binary With Libraries section.
  • Add the framework directory to the framework search paths.

For more information ,see my blog at JianShu: https://www.jianshu.com/p/c65599da18c0

Wedurn answered 22/5, 2021 at 14:41 Comment(0)
S
1

i got the same issue and nothing works from above answers. so i debugged my code and i found out that there was a folder that was missing and instead of showing any error i was getting "distribute content" instead of "distribute app". So if anyone have the same issue please check for the red folders or swift files in their xcode.

Simdars answered 12/3, 2022 at 22:14 Comment(0)
A
0

Unticking the 'Find Implicit Dependencies' tick box solved it for me. Hope this helps. Said Tickbox

Anastassia answered 2/4, 2019 at 18:17 Comment(1)
Well, unfortunately its not working for me. Throwing error of "Linker command failed with exit code 1". I guess its trying find framework builds but can't find when I untick that option.Th
A
0

I had the same problem in different projects in the last few days.

In one of the projects, a solution had to delete the .xcproject subproject file.

In another project, the solution was to uninstall .xcworkspace (I use cocoapods) and run pod install.

Amygdala answered 13/11, 2019 at 16:5 Comment(0)
S
0

I got the same issue, I tried skip install setting it with "No" didn't work for me.

I removed the script added for swiftlint in build phases then it works fine.

Sportswear answered 1/8, 2022 at 5:21 Comment(0)
R
0

Check if there is a reference to non existing files and build on: Any iOS Device target to debug beter the problem. In my case i had to remove the referenced files in the project tree... I was then able to archive and the option to upload was enabled.

Reflect answered 28/4, 2023 at 23:47 Comment(0)
U
0

I had to change the "Build Documentation During 'Build'" option to No.

enter image description here

Unfruitful answered 30/11, 2023 at 20:43 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.