DEV Community

Maria Zaitseva
Maria Zaitseva

Posted on

Things I learned after 5 years of iOS development

"I will try Swift for a week to see what it feels like," I thought one day and switched my careers to become a full-time iOS engineer. Now my laptop costs more than it should and I have an opportunity to say "Sorry, I don't know how to use Windows" whenever someone asks me to fix their computer. Feigning ignorance is so much easier when you use a technology almost no one uses in your country.

So today I'm going to share with you my Top 5 Things I Learned After Working 5 Years as an iOS Engineer.

Thing 1: Get Your Own Mac

I usually say that for a programmer, their computer is like a sword for a samurai or something like that. It's your tool which you need to learn well and preferably have complete ownership over.

Get an M1 machine if you can. I have an Intel based mac and I feel like such a loser because I purchased it right before the M1 has been released. Woe is me. I still like my mac though, it's alright.

Learn macOS. It's Unix(-like) under the hood, so exploring the command line capabilities is a good educational experience and a nice way to spend a quiet evening.

Thing 2: Xcode is a Witch, so Pick Up Some Witchcraft

I don't love Xcode. The amount of features is frightening and you never know where things are until you stumble upon them. But that's okay. It's a computer program, not your spouse. You can get over the inconvenience (if Xcode ever strikes you as inconvenient like it does for me). I put sticky notes with hotkeys on my wall because memorizing them is painful and not using them is even more painful. So learning Xcode feels kinda like a deal with the Devil in a way because you sacrifice your soul in exchange for increased productiveness.

Thing 3: I'm Just Trying to be Objective, See?

It might seem like Objective-C is an outdated language now and you don't need to touch it unless you want to work with legacy code. It's not really the case: the majority of iOS runtime is written in Objective-C, and so it's useful to understand its quirks and its programming model if you want to be efficient with these APIs. Even more so if you want to develop Mac apps: some APIs seem so antiquated you wonder if it's even legal to use them in modern apps. Also some good libraries are written in Objective-C, and you will want to use them and understand their code as you debug weird issues that will eventually surface in your app.

Thing 4: Architectures

So. Many. Of. Them. Look at the job postings, some will want you to know MVVM, some others will require MVP, or MVVM-C, or VIP. Personally, VIPER makes me weep. In most codebases, you will write a lot of classes and structs and protocols. Not because you want it or because it's logical and makes sense, but because that's how things are done. I may sound grumpy when I say it, but I'm actually a big fan of well-structured and organized code: it's just that it's a not very exciting topic that you still have to be proficient in.

Hint: most architectures are variants of MVC. MVC is a classic and you should read the original MVC 1988 paper whether you're an iOS developer or not. I can't find a link right now, sorry.

Thing 5: Swift is Getting Bigger Every Year

Ah, I remember early Swift. The compiler was slow and stupid, new versions broke old code easily, there was no SPM, but the language was good and it got me hooked even if the dev experience was a bit compromised. Today the dev experience of Swift is brilliant. This came at the cost of the language itself becoming increasingly hard to master. So many things are hard to get right: memory management, concurrency, types (if your protocol has an associatedtype, at some point it will be painful to use). And now Swift is even more complex: it has async/await, macros, that thing where you put any before a type name (I still haven't learned this feature well), and I suspect Swift will only get more complex down the line. More studying, yay! πŸ“š

Conclusion

iOS is a cool platform, and you're a cool person if you're developing for it. Thanks for reading.

Top comments (0)