r/iOSProgramming • • Apr 15 '22

Humor What it’s like opening up documentation from anyone besides Apple

223 Upvotes

41 comments sorted by

116

u/JamesFutures Apr 15 '22

I feel this. Apple documentation is some of the most useless documentation I’ve ever had the displeasure of reading.

I started on Android. At the time, I thought Google documentation was bad… oh boy.

Apple is so interesting. Swift is just awesome. SwiftUI is a breath of fresh air. Working with that technology is so nice and pleasant. But what IDE do you have to work in? Xcode. The worst IDE I’ve ever touched by a significant margin. What documentation do you have to read? Apple docs. Which provide almost zero useful information.

4

u/[deleted] Apr 15 '22 edited Apr 15 '22

I’ve read tweets from Apple staff engineers and they talk about how their internal tools are way better, so I imagine the same goes for their documentation.

I don’t think it’s really intentional tbh tho. I think the company has just been around forever and they have a certain way of doing business and they’re probably just oblivious to things like this.

They’re working on stuff that takes a much higher priority I guess. Hence, why there’s still no calculator app on the iPad lol

38

u/Niightstalker Apr 15 '22

Tbh I enjoy XCode more than Android Studio. While Android Studio is nicer to refactor I encounter way more issues with. The emulator is just crap compared to the simulator imo and has one issue after the other.

15

u/akerskuuug Apr 15 '22

I'm genuinely curious as to what issues you've encountered in Android Studio? Not saying that I've never encountered any, but it hasn't been that common in my experience and workflow.

I totally agree with regards to the Android emulator and iOS simulator, it's not even close.

Other than that, I feel that Android Studio is much more predictable to work in. I don't know if this is due to my company's large code base on iOS, but searching for definitions or callers of functions fails nine out of ten times. Usually I just get the infuriating question mark and have to do a text search in the entire project. In AS it basically works every time.

15

u/nullpotent Apr 15 '22

And debugger is utter shit in Xcode, sometimes you can watch values in scope, sometimes you can't.

4

u/phughes Apr 15 '22

It used to be great. Then Swift came along and it hasn't worked well since.

3

u/Niightstalker Apr 15 '22

A wide range tbh. From visual bugs when trying to move tabs at the top. Over Android Studio randomly not going into brake points. Or it just doesn’t build unless invalidate caches and try again then it works, emulator stopping to work from one day to the other and I need to recreate it, etc…

Im not saying Xcode has no errors (it definitely has). I just encounter more when working with Android Studio.

2

u/akerskuuug Apr 15 '22

I see, thanks! Yeah, I've encountered the Invalidate caches issue now that you mention it.

I have almost entirely given up using the emulator, apart from when I am testing for different screen sixes I just use a physical device on both Android and iOS.

2

u/GAMEYE_OP Apr 15 '22

Gradle is awful. If you have errors they are typically reported in some error file and it usually will tell you this but not where that file is located.

Native code integration, while a lot better than it used to be, is still a bit of black magic. JNI is still a bitch.

The emulator is completely awful. Sometimes it becomes completely unresponsive. Want to figure out why samsung phone’s are fucking up with your application? Good luck, the emulator only emulates google’s android builds. You’re gonna have to use samsung’s weird website and pray to god that works since everyone and their mother implements their own android build and they aren’t following standards well.

Have a release build on your phone and having some crash you want to debug with a debug build and keep the file state and settings state of the app? Too bad, android studio says it must uninstall the app before it installs the debug one.

The list can go on for hours. How much time do you have?

2

u/iindigo Apr 15 '22

ProGuard can be infuriating too. It’ll silently cut huge swaths of functional code out of your production binary and you won’t know about it at all until the build is rolling out to users and you start seeing missing class crashes piling up left and right.

Deployment for iOS isn’t without quirks but clang’s code stripping at least has enough intelligence to usually not be part of the problem.

1

u/iindigo Apr 15 '22

For me Android Studio’s “smarts” often end up getting in the way more than helping.

Like for example, when changing the string localization key in a layout XML file, Android Studio will offer to change all references to that string key across the project. Handy, right? Well, if you accept the offer, half the time or more it’ll botch the refactor and leave the project unbuildable with no easy way to revert. It also does that if you turn down the offer. Infuriating.

Xcode has problems too but at least in my experience, once you figure out what it doesn’t “like” (mainly learning how to not anger SourceKit, which precludes various code smells anyway), it’s smooth sailing.

3

u/JoCoMoBo Apr 15 '22

The emulator is just crap compared to the simulator imo and has one issue after the other.

It's much easier for me to run Android code on an actual Android device than it is to run the emulator.

3

u/Niightstalker Apr 15 '22

Yes that is definitely the case but exactly that is the annoying part. For a quick check on different device sizes etc it works pretty well in XCode with the simulator. But using the emulator in Android Studio is just a pain in the ass.

1

u/mrdibby Apr 16 '22

The emulator is just crap compared to the simulator imo

in the old days of Android dev I'd agree but the emulator has been pretty great for the last few years. Actually Genymotion used to be pretty good too before the Google made emulator caught up.

I also recall the iOS simulator throwing up issues that weren't seen on normal devices which used to bring a bit of discomfort to the process.

1

u/Niightstalker Apr 16 '22

It’s one thing throwing up some errors and hoch don’t happen on real devices compared to the simulator just not working at all. While the emulator is not as bad as it was it is definitely Italy not good. And imo the iOS simulator is definitely ahead in that regard.

6

u/DaddyDontTakeNoMess Apr 15 '22

I feel your pain. You know it’s bad when you have to use Microsoft’s iOS docs.

4

u/[deleted] Apr 15 '22

I hope Apple replace Xcode soon with an all-new IDE built from the ground up. I mean, Playgrounds looks like a good alternative where you can expand and create something bigger.

I know it is gonna be difficult for them as Xcode relies a lot on Obj-C libraries, but I don’t know, a new IDE focused on Swift-only Apps? I would buy it.

I cannot stand waiting minutes and minutes just to build my project. Man, Swift is supposed to be a faster language and the same project on Obj-C is 2 times faster.

4

u/iindigo Apr 15 '22

I don’t think it’s necessary to toss out Xcode entirely… it’s probably sufficient to prune or spin out parts of it into separate programs.

Project Builder/Xcode was pretty solid until they merged Interface Builder into it. After that it became dramatically more slow and buggy. I barely use IB these days (all my UIKit iOS projects are code-only) and that trend is only going to accelerate with SwiftUI’s maturation, so I think it would make a lot of sense to boot IB back out into a separate app.

3

u/[deleted] Apr 15 '22

Yeah of course, they don’t have to. But I think that Apple hasn’t been taking care about their software quality the past years. iOS, macOS and iPadOS being more a more buggy with each release, Xcode is being worse and worse year after year.

2

u/Yellowcat123567 Apr 15 '22

Clearly you’ve never used eclipse

1

u/JamesFutures Apr 15 '22

I have. It’s better than Xcode.

1

u/Equivalent_Cookie_ Apr 15 '22

Can you run swift/swiftUI in Eclipse?

1

u/SeesawMundane5422 Apr 16 '22

Meh here come the downvotes, but Xcode is fine. I’m SwiftUI only, so maybe that’s a difference. But I type, I format, I compile, it runs or it shows me the compiler errors. It mostly works, which is mostly in line with all the other IDEs I use.

3

u/Equivalent_Cookie_ Apr 15 '22

Is there any way we can collaboratively write documentation for Swift/SwiftUI?

2

u/[deleted] Apr 15 '22

There's Swift On Tap, which is pretty useful. There are probably a few other sites like that. But other than that, Stack Overflow and Medium articles are probably the easiest way to collaboratively cover their APIs.

3

u/javaHoosier Apr 15 '22

SwiftUI Companion app is incredible.

But its expensive. Also just the articles and repos that Javier posts are next level.

4

u/[deleted] Apr 15 '22

Wow, this is kind of blowing up. I'm happy I'm not alone on this lol, I appreciate the love. Fingers crossed Apple announces plans to rework their documentation at WWDC22!!

Of course, a shameless plug: I'm working on a file inspector app for macOS! I'm in the process of updating it so it's not out yet but I'm getting close! You can check it out here → https://informant.so

2

u/[deleted] Apr 17 '22

This looks very handy, awesome tool!

2

u/[deleted] Apr 17 '22

Thank you! It’s been a lot of work to get right :)

2

u/[deleted] Apr 17 '22

I can imagine, I’m working on my first app right now so definitely understand that 😅 how long have you been working on it?

2

u/[deleted] Apr 17 '22

Oh good job! What is it?

-- it originally took four months for an initial release and it’s going to take about two months for a re-release. So six months total so far

2

u/[deleted] Apr 17 '22

I could tell you… but I’d have to kill you. Jk, in essence it’s a bi-directional booking app that can suggest times and places for people to meet based on their location and availability. In way over my head as a beginner but gotta start somewhere!

Nice going. Is this a side project for you?

2

u/[deleted] Apr 17 '22

That’s an awesome idea! It sounds like it’d be a better alternative to Google Map’s events. It’s good to work on something a little bit outside your comfort zone!

— it started as a side project but I’m putting a lot more time towards it now!

2

u/[deleted] Apr 17 '22

Thanks! Reassuring to hear people think it’s a decent idea, guess we’ll see how it turns out. Best of luck with the remainder of the project

1

u/[deleted] Apr 17 '22

Thank you. You too. :)

10

u/noahflk Apr 15 '22

Every year Apple hypes up developers at WWDC like no other but their developer experience is, well...

-9

u/hkmn444 Apr 15 '22

I’m an iOS developer and I can find anything I want regarding a specific object / api by searching the documentation. What exactly is bad in Apple doc ?

11

u/Barbelleatsdumbbell Apr 15 '22

I think it's something that becomes noticeable when you have experiences with docs from other languages. With python and js, the docs are way more descriptive, often provide examples, and you leave understanding what you read.

With Apple, the docs are often just the function signature or a vague one liner. And boy did SwiftUI 1.0 docs feel like satire.

4

u/[deleted] Apr 15 '22

I was looking at the docs for Electron and that’s what prompted me to make this meme. I couldn’t believe how detailed they were

28

u/flad-vlad Apr 15 '22 edited Apr 15 '22
  • Many API are not documented at all, especially once you start venturing out of UIKit and Foundation. A lot of people complain about this.

  • The documentation for many symbols is useless and just paraphrases the long Cocoa-style name (eg NSStringDrawingOptions.usesLineFragmentOrigin or NSQueryGenerationToken, both of which are useful API but good luck determining what they actually do from their descriptions because neither are common knowledge)

  • The documentation that does exist is often lacking. For example if you want to learn how to use a framework like Core Data you have to turn to 3rd party tutorials or books, which are often outdated or flat-out wrong, because even though NSManagedObject, NSManagedObjectContrext, NSPersistentStore, etc all have some documentation there isn’t much that tells you how you use them together.

  • There are so few pictures in the UI frameworks’ documentation. For example there aren’t even colour swatches for the predefined UIColors and the description for UIProgressView.Style.default is simply “The standard progress-view style”.

  • The documentation is spread out across a variety of mediums and locations, many of which aren’t accessible from Xcode. There also are so many important bits of information hidden in WWDC videos or Quinn the Eskimo forum posts or random devs’ tweets that aren’t easy to find.

  • Some documentation is just plain bad or even wrong (see Grand Central Disptch for example)

  • It’s not easy to search within documentation articles, which makes it hard to find out what features a framework actually has.

  • Error codes are such a pain to search for because you have to click each one to see its integer value, and because ObjC enum case names can’t be printed. I also encounter a lot of error codes that don’t exist in the documentation at all.

9

u/[deleted] Apr 15 '22

lol, I got help from Quinn the Eskimo one time and they totally saved my ass — Quinn the Eskimo is a god amongst us mere mortals