r/iOSProgramming • • Jul 05 '21

Discussion Tired of Xcode.

I don’t know about you, but I’m starting to get sick of it.

First, it’s terribly slow.

  • Opening a storyboard with a single ViewController can take over a minute, and any file I try to open will be a blank screen until it’s done loading the storyboard.

  • But then, just opening a project can take quite a bit of time.

  • Yes, SwiftUI is supposed to be better. But, personally, SwiftUI previews have only ever worked for tiny brand new projects. Then they just start failing.

Second, it’s unreliable.

  • One day it’ll open a project. The next, it’ll (take a long time and) crash trying. But opening said project via right-clicking on Xcode’s Dock icon will work. Go figure.

  • Then, suddenly, at some point while programming, all syntax highlighting will be gone, and auto completion will just stop working, plain and simple.

  • Edit 2: Also, @IBDesignable. It’s a neat idea. If only it worked reliably instead of randomly failing to render.

Third, I find it’s build time errors can be ridiculous.

  • The worst of course, is when using things like RxSwift. But I find the Combine ones pretty hilarious too, sometimes.

Fourth, it’s "refactoring" capabilities are meh.

  • When it does work, and doesn’t just take ages playing it’s accordion animation only to fail cryptically, the renaming refactoring feature will often behave like a simple search and replace, renaming properties from other classes and structures.

Last, weird bugs with more or less helpful logs:

  • Why do we have to wipe the DerivedData so often? It was almost nice and fine until we started adding SPM packages into the mix and they too were stored there. Now, after wiping those, we also have to redownload our dependencies. Yay

  • Did you know there were other folders you could clean up when stuff stops working? There’s xcuserdata in the xcworkspace, also ~/Library/Caches/com.apple.dt.Xcode.

  • And sometimes you have to reboot your Mac because somehow XCode suddenly lost the rights to write into one of it’s build folders. Don’t ask me how; I have no idea

  • Crashes / hanging forever because a device is plugged in / connected "over the network" ? Seems it’s been fixed since. But that was pretty annoying.

Anyway, sorry for the rant. It just gets tiring over time, and sharing with other people who might know that pain makes it feel better.

If anyone has solutions, you are more than welcome.

And if I’ve forgotten anything this godforsaken tool does wrong, you absolutely are welcome to chime in.

Edit: fixed format

170 Upvotes

96 comments sorted by

View all comments

13

u/EighthDayOfficial Jul 05 '21

I have had none of these issues except being slow in large code files, but that is my fault for being bad at programming.

It definitely needs some work but people both expect it to be free and high quality.

I would prefer to spend $300-400 at least on a nice professional setup, like Metrowerks CodeWarrior used to be. I'd prefer to have an independent company whose profits/losses depend on making it better. If you are a developer, you should be willing to spend for some great tools that end up saving you time.

But the "everything is free" has caused a race to the bottom in a lot of things. If its not generating revenue, companies will tend to divert resources away and the people who work on the project can't really move up because the project they work on generates no revenue. Can't be like, "I doubled revenue" if there is no revenue. So the talented managers and programmers will self select out of that team into revenue generating projects.

I bet the programmers that work on Xcode have much higher turnover than other areas of the company, and the management is as well. The result is lack of long run focus.

I code in Objective C/C and my UI is entirely in code (for future portability). So I don't deal with storyboards or any of that.

62

u/[deleted] Jul 05 '21 edited Jul 05 '21

XCode isn’t free.

It’s whole purpose is to enable the creation of iOS, macOS, etc apps, off of which Apple makes 99$ / year in developer program fees and 30% on sales.

It also costs a Mac, and usually at least one iOS device (given the simulator’s limits), although many iOS developers usually already have one of each.

Believing XCode to be a gift freely given out of the goodness of Apple’s heart, and thus lower our expectations of it, is a terrible mistake.

Other than that, I definitely wouldn’t wish it on my worst enemy (although…) to work on that project. Xcode’s codebase is probably a mess.

Edit: also, keeping the UI as code is a pretty good solution, but we lose on many of the supposed features. And there always is legacy code out there with massive storyboards which we won’t ever be given the time to migrate

2

u/MKevin3 Jul 07 '21

Were you around in 2010-2012 timeframe when Apple tried to charge for Xcode? I think they put it on macOS store (what ever its name was back then) for $4.99.

https://en.wikipedia.org/wiki/Xcode#:~:text=Before%20version%204.1%2C%20Xcode%20cost,on%20the%20Mac%20App%20Store.

Looked it up - it was in 2010 when I first got into iOS programming.

Xcode is my least favorite IDE still in use. At least they are finally adding improved Git / VC support. It was basically unusable until recently. I did most of my ObJC work in AppCode and did code based layouts via Masonry as I have never been a big fan of Interface Builder either.

Initially I was not a huge fan of IntelliJ but have grown to like it over the years from AppCode to IntelliJ base for Java / Kotlin stuff, Rider for C# and Android Studio. Not perfect for sure but more full featured than Xcode for general programming than Xcode by a long shot.

1

u/[deleted] Jul 08 '21

Were you around in 2010-2012 timeframe when Apple tried to charge for Xcode? I think they put it on macOS store (what ever its name was back then) for $4.99.

I didn’t have that displeasure, no. Only starting iOS programming in 2015.

It’s quite startling to learn that they once actually charged for it, given it’s state.

1

u/WikiSummarizerBot Jul 07 '21

Xcode

Xcode is Apple's integrated development environment (IDE) for macOS, used to develop software for macOS, iOS, iPadOS, watchOS, and tvOS. It was first released in 2003; the latest stable release is version 12. 5. 1, released on June 21, 2021, and is available via the Mac App Store free of charge for macOS Big Sur users.

[ F.A.Q | Opt Out | Opt Out Of Subreddit | GitHub ] Downvote to remove | v1.5

-15

u/EighthDayOfficial Jul 05 '21

CodeWarrior in the 1990s was a lot more expensive and they had a well documented framework (PowerPlant).

$100 is not the price of Xcode you can avoid that. I put my free game on itch.

What I'm saying is if you are not releasing free games, to keep pace with inflation CodeWarrior today would be well over >$1000.

DevKits used to be a lot more expensive as a whole. This cannot be denied.

I am merely pointing out how companies work.

There is likely no budget line coming into the team that makes Xcode that says "we make $ revenue for the company."

Because of this, a manager can't go, "I doubled sales." What that means is over time, things will tend to get fairly "minimal."

CodeWarrior, to those that paid for the pro package, was a lot better devkit.

26

u/[deleted] Jul 05 '21

$100 is not the price of Xcode you can avoid that. I put my free game on itch.

You missed the

and 30% on sales.

Every single app on the iOS App Store is built, in part or totality, using Xcode.

It’s the tool every single iOS developer has to use at some point or another (even if just for code signing) to release an app on the App Store.

It’s the tool that enables the 2.22 million apps on the App Store. The behind the products that enabled the App Store to make an estimated $64 or $72 billions of revenue in 2020, of which Apple takes 15% to 30%.

Sure, there’s infrastructure and the App Store itself. But Xcode is paid for. Many times over. And any decent CFO with domain knowledge would know the role the tooling plays in that.

Otherwise, we simply wouldn’t have gotten Swift or SwiftUI. They simply wouldn’t have cared to create tools to simplify the development process. And they wouldn’t be working on things like Xcode Cloud either.

I know some companies work like what you describe. But not all of them. Some are much better at accounting & finance than that.

See MS with VS Code & GitHub, Amazon with Prime, etc

13

u/fartsniffersalliance Jul 05 '21

Xcode isn’t free because people expect it to be free, it’s because Apple wants to attract developers to use their platform (and also people who aren’t developers). Apple wants to make it as accessible to anyone to write an app as they make money on having your app on their App Store. Besides, you still have to buy a Mac to access it, and then you have to pay the developer fee to publish.

VSCode is entirely free and is a very high quality editor

9

u/RebornPastafarian Jul 05 '21

VSCode is entirely free, high quality, and has an amazing plug-in system and is open source.

If Apple can’t be bothered to fix Xcode they ought to let the community do it, or let us build an alternative.

0

u/DerelictSausage Jul 05 '21

I think that’s part of why they keep it free, sort of like “dip your toe in the water” of Mac/iOS development before diving in.

But the cynical side of me says they keep it free to avoid more anti-trust lawsuits since they make it nearly impossible to build to their devices without Xcode.

They say it’s for security reasons, but I’m sure they can keep the app-signing part as part of some separate framework that’s done in the distribution build step.

Also, like you said, you have to buy a Mac to use it, so even though that’s a smaller part of their device sales, that’s a guaranteed income every couple of years from developers.

They can make some parts free, as in open source, and let the community make the IDE part better.

0

u/[deleted] Jul 05 '21

[deleted]

0

u/EighthDayOfficial Jul 05 '21

Are you going to sit there and tell me that the documentation for Apple's ecosystem is as good as the "Toolbox" documentation of the 1980s or CodeWarrior's PowerPlant documentation?

The documentation is garbage and they haven't settled on something long enough (Objective C? Swift?) to flesh it out.

0

u/[deleted] Jul 05 '21

[deleted]

-1

u/EighthDayOfficial Jul 05 '21

No, I'm saying is if it were made by a company whose sole purpose was to make tools and charged a lot for it, they would make better tools and documentation.

Xcode is pretty good - I have no major complaints with it.

Apple's issue is they keep changing directions. IMHO Objective C was fine and I would have rather had a well developed unity like multiplatform dev kit for Objective C than something new and shiny like swift.

5

u/a1b2c3d4g Jul 05 '21

It does suck for people who pay to be part of the developer program. Not exactly free in that case. Also, releasing new emojis gets them (Apple) money, improving developer productivity does not, so we always see updates for emojis.

-6

u/EighthDayOfficial Jul 05 '21

The dev program is a separate line item in the company budget and in all likelihood, the managers at Xcode can't claim that additional revenue. $99 today is nothing compared to what dev kits used to cost. You used to get a lot more support and documentation.

There used to be these things called bookshelves that programmers had with volumes of documentation. Apple's documentation now is a joke.

That is my point, my belief is the way companies work the managers that are up and comers (and programmers) want to work on things that bring in money so they can demand more bonuses.

In Xcode dev, I'm betting they get bonuses by saving money and not revenue.

3

u/offeringathought Jul 05 '21

You make a good point about incentives not lining up to get a solid, performant Xcode. My impression is that Apple specifically doesn't breakdown revenue and associate it with small teams. I don't have the source but I read that when Steve Jobs came back Apple was divided into divisions that would constantly argue about who was responsible for various expenses. It was so dysfunctional that while the whole company was loosing lots of money each division was reported as profitable. Jobs reorganized Apple around functional areas and did away with profit/lose and division levels. My loose understanding is that it is still that way today. Senior executives are responsible to functional areas (hardware, software, services, whatever) the profit and loses are seen primarily as one unified company. (I could be wrong about some of all of this.)