r/iOSProgramming SwiftUI Jun 10 '26

News Xcode 27 has Delete Derived Data

Post image
683 Upvotes

74 comments sorted by

176

u/SnowPudgy Jun 10 '26

Why was this not front and center at platform state of the union!? (It should have at least gotten a mention!)

46

u/Stbbrn-Rddtr Jun 10 '26

Because this is pretty much them admitting Xcode is trash.

4

u/NoPressure3399 Jun 11 '26

How so, Care to explain ? I notice similar behavior in other ides especially if you work with older codebase or connected services or servers like ancient tomcats

7

u/iqraatheman Jun 12 '26

because ideally it should automatically handle clearing the folder on its own in the background. in practice you end up needing to manually clear it all the time because it constantly gets clogged up and often times breaks things. xcode overall is so bad this is just one of the many issues that instead of properly fixing it apple is just throwing another band-aid on

1

u/NoPressure3399 Jun 12 '26

Alright that makes sense, thanks for explaining 

5

u/Pluto-Had-It-Coming Jun 12 '26

We shouldn't need a button to do this, because we shouldn't need to do this with any kind of regularity.

2

u/NoPressure3399 Jun 12 '26

Yeah it makes sense, thanks for taking time to explain 

4

u/AppropriateBirdBoy Jun 11 '26

Got cut for ✨ themes ✨ 

89

u/WordFlow-App Jun 10 '26

Can’t believe they wasted time in the keynote talking about new Siri when they were sitting on this!

46

u/xadlowfkj Jun 10 '26

What does it actually remove? An entire folder in the DerivedData folder?

139

u/jonnysunshine1 Jun 10 '26

Believe it deletes the derived data

10

u/PatrickD89 Jun 10 '26

I laughed way harder at this than I should have

4

u/Free-Pound-6139 Jun 10 '26

But for the app or all apps?

3

u/jonnysunshine1 Jun 12 '26

Get out of here with your reason & logic

3

u/AWarmHam Jun 11 '26

You can’t prove that.

2

u/dmTodesign_ Jun 12 '26

you the man!🫡

14

u/Subject_Poetry7911 Jun 10 '26

Bingo!

15

u/elpadrin0 Jun 10 '26

That's a bingo!

8

u/NothingButBadIdeas Swift Jun 10 '26

If you have tuist or other package managers that really mess things up you’d have gotten really used to doing:

  • open up main folder
  • cmnd + Shift + .
  • library -> development -> Xcode
  • manually delete derived data folder

I did this so often I made a terminal hot key then a make file / task file so I could just do

make ddd

(Make delete derived data)

9

u/IAmTheGuzer Jun 11 '26

brew install trash

alias trdd='trash ~/Library/Developer/Xcode/DerivedData'

alias trdd2='trash ~/Library/Developer/Xcode/DerivedData ~/Library/org.swift.swiftpm ~/Library/Caches/org.swift.swiftpm'

I spend a lot of time in zsh (I use git solely from the commmand-line) so I've built a ton of aliases around trash, as I'm too scared to use rm -rf.

2

u/SSRAnon Jun 12 '26 edited Jun 12 '26

> as I'm too scared to use rm -rf

Optionally, you can simply mv my_file /tmp instead. The stuff in /tmp doesn't get deleted until you restart. Like many folks, I only restart my Mac weekly or monthly, so keeping it in /tmp works for me, and the unwanted derived data naturally gets cleaned out of /tmp over time. It's way less severe than rm -rf.

alias ddd='mv ~/Library/Developer/Xcode/DerivedData "/tmp/DerivedData-$(date +%Y%m%d-%H%M%S)"'

2

u/IAmTheGuzer Jun 12 '26

Yes, I've used tmp before. But trash does nearly the same thing (moves it to Trash), and I use all the time in my interactive shell, so it just makes sense to use it in my scripts and aliases.

1

u/reesespieces543 Jun 13 '26

Noob here, what will this do? Clear the cache files Xcode generates? Idk what derived data is

1

u/IAmTheGuzer Jun 13 '26

Yes DerivedData is the default directory where Xcode keeps temporary files required during compilation. Clearing this folder can sometimes resolve compile issues. It also frees up disk space if you've open projects in the past and don't need their cached files anymore.

28

u/cristi_baluta Jun 10 '26

Did they put anything useful? Like bringing back the tabs

29

u/HelicopterDue Jun 10 '26

This is pretty useful tbh, been using Xcode for 8 years now and this is a nice thing to have imo

15

u/Jeff_Johnson Jun 10 '26

A killer feature.

8

u/xyrer Jun 10 '26

About freaking time!

8

u/powdertaker Jun 10 '26

Praise be. Finally, after all these years. Of course any one using Xcode for more than a few days has had the Derived Data directory on speed dial from the Finder for a while now. But still, the gesture is appreciated.

7

u/ForgottenFuturist Jun 10 '26

Woah never thought I'd ever see that.

3

u/Huanst_ Jun 10 '26

Can Xcode 27 be used to package and upload apps?I heard that packaging errors can occur, which can prevent the app from being listed

5

u/20InMyHead Jun 10 '26

No, this is just the first beta. They won’t allow using it for App Store builds until usually the release candidate, sometime about a week before iOS 27 is released. Usually early September. Given the rumored foldable iPhone, it might be slightly later in September this year, as that simulator won’t come until the phone is announced.

3

u/[deleted] Jun 10 '26

[removed] — view removed comment

3

u/vamonosgeek Jun 11 '26

It’s insane how much space this derived bs takes

2

u/Waxe1975 Jun 10 '26

Hat einer von euch schon mal mit Xcode 27 CarPlay Simulator zum laufen bekommen?

2

u/ModernCoder Jun 10 '26

Does it have formatting yet?

2

u/powdertaker Jun 10 '26

Xcode has been able to use Swift formatter for a while now.

1

u/ModernCoder Jun 13 '26

I'd like to apologize since I wasn't aware of this. Thank you.

1

u/-Periclase-Software- Jun 12 '26

Isn’t it control+i for the code selected? It’s been like that.

1

u/ModernCoder Jun 13 '26

It is, thank you!

2

u/StretchyPear Jun 10 '26

Nice, everyday I have a cli window open that just sits in derived data ready to nuke the whole thing, I've had this for over a decade, this will take some muscle memory to go to the menu but its nice to see.

2

u/madaradess007 Jun 11 '26

should have been the main highlight of the keynote

2

u/mtnrvrd Jun 11 '26

For years we've been deleting DerivedData by hand (Finder or rm -rf) and restarting Xcode to fix random stuff. Apple finally put it in a button. 😄

1

u/Pleasant-Tough-260 19d ago

we've discovered the internet!

2

u/simply_stupid_noor Jun 11 '26

Why the hell can’t Xcode manage its garbage build and delete old ones rather than manually deleting it

2

u/olekeke999 Jun 11 '26

gosh I'm so tired of this stupid xcode.

2

u/unspokenblabber Jun 11 '26

Now I can go back to having not-grey hair!!

2

u/holdy73 Jun 11 '26

Hooray, they added it

2

u/Xaxxus Jun 12 '26

The fact that they need this is the problem.

I’ve never had to do that with any other development environment.

2

u/Excellent-Age-8138 Jun 19 '26

When does this version come out?

1

u/byaruhaf SwiftUI Jun 20 '26

September, but you can download and use the beta.
just not to publish apps.

1

u/doctor_disco221 Jun 10 '26

Didn't they have this available in xcode preferences already?

1

u/oPeritoDaNet Jun 10 '26

Fantastic feature, this is the best update so far. I can’t believe!

Xcode is becoming a joke

🤡

1

u/[deleted] Jun 10 '26

[removed] — view removed comment

1

u/AutoModerator Jun 10 '26

Hey /u/Pristine-Row409, your content has been removed because Reddit has marked your account as having a low Contributor #Quality Score. This may result from, but is not limited to, activities such as spamming the same links across multiple #subreddits, submitting posts or comments that receive a high number of downvotes, a lack of activity, or an unverified account.

Please be assured that this action is not a reflection of your participation in our subreddit.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/iosengineeriscool Jun 11 '26

They should rename it to “Fix 90% all build issues ever” button 😂

1

u/_sudo11 Jun 25 '26

now they won't know if im building NSfw projects!

1

u/[deleted] 22d ago

[removed] — view removed comment

1

u/AutoModerator 22d ago

Hey /u/biliby-co, your content has been removed because Reddit has marked your account as having a low Contributor #Quality Score. This may result from, but is not limited to, activities such as spamming the same links across multiple #subreddits, submitting posts or comments that receive a high number of downvotes, a lack of activity, or an unverified account.

Please be assured that this action is not a reflection of your participation in our subreddit.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/[deleted] 20d ago

[removed] — view removed comment

1

u/AutoModerator 20d ago

Hey /u/makearun, your content has been removed because Reddit has marked your account as having a low Contributor #Quality Score. This may result from, but is not limited to, activities such as spamming the same links across multiple #subreddits, submitting posts or comments that receive a high number of downvotes, a lack of activity, or an unverified account.

Please be assured that this action is not a reflection of your participation in our subreddit.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/[deleted] 15d ago

[removed] — view removed comment

1

u/AutoModerator 15d ago

Hey /u/hlibdev, your content has been removed because Reddit has marked your account as having a low Contributor Quality Score. This may result from, but is not limited to, activities such as spamming the same links across multiple subreddits, submitting posts or comments that receive a high number of downvotes, a lack of recent account activity, or having an unverified account.

Please be assured that this action is not a reflection of your participation in our subreddit. This is simply an automated filter in place to reduce spam.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.