One of the hardest things with testing your Swift code is getting started. The blank canvas of a fresh app can be intimidating and it’s easy to postpone writing your tests until you’ve finished writing some code.
“I’ll get to it when I’ve written some code so I know what the architecture of the app is going to look like. This will make it easier for me to add tests later.”
This often leads to a situation where you’ve written plenty of code and suddenly it becomes even harder to start writing tests because, well, your code has essentially become…
When starting a new Swift project, developers tend to plan ahead: “Oh, I need networking, I’ll make sure to add Alamofire.”, or: “We want to use Functional Reactive Programming, let’s add RxSwift/ReactiveSwift.”. Maybe you need to parse some JSON and have always used SwiftyJSON, so why not add that as well? However, starting a new project (or performing an update) also gives you an opportunity to evaluate your options again: does my project actually need all these third party dependencies? Let’s find out.
SwiftUI introduced us to a whole new way of designing and coding interfaces. Gone are the old ways of subclassing UIKit (or AppKit) classes and hardwiring layout constraints. Instead, we now have a nice, declarative way of structuring and styling our controls and making sure the interface updates whenever new information or events arrive.
To facilitate this new architecture, the good people at Apple took some of Swift’s best features (e.g. protocols, generics, opaque types) and combined them into SwiftUI. However, this comes at a hidden cost: If you’re not already well-versed in these features, there will be a bit…
Apps are super fast and really responsive … except when they’re not. Whenever you’re dealing with mass computation in your code, there’ll be a point where your functions are slowing down and you find yourself staring at your code wondering why this simple addition, multiplication, or division is bringing everything to a halt. Weren’t we supposed to have supercomputers in our pockets?
Every once and a while, it’s a good idea to just take a moment from working on your projects to take a step back and see what’s currently happening in your field of development. Fortunately, for iOS developers that moment comes (at least) once a year when Apple starts announcing the new features for iOS at WWDC.
One of the major announcements Apple made in 2019 was the addition of SwiftUI to the iOS development toolkit. It’s not meant as a direct replacement of UIKit, but it’s certainly a more modern approach to building user interfaces. …
Swift/Ruby/whatever. I’m a freelance software developer based in The Netherlands. Figuring out new stuff is what makes me tick. 🤓