All posts
Categories
Podcast
Newsletter
Subscribe
Basics
WWDC 2018
Meta
Talks
Twitter

Subscribe

New posts weekly.

Thank you!
Swift by Sundell A weekly blog about Swift development

Mar 24
Mar 24 Testing Swift code that uses system singletons in 3 easy steps

John Sundell

Most apps written for any of Apple’s platforms rely on APIs that are singleton based. From UIScreen to UIApplication to NSDate, static APIs are everywhere in Foundation, UIKit & AppKit. In this post I give 3 easy steps to easily test code that uses such APIs.

Mar 18
Mar 18 Simple Swift dependency injection with functions

John Sundell

Dependency injection is a great technique for decoupling code and making it easier to test. In this blog post I take a look at how functions can be used for simple dependency injection.

Mar 10
Mar 10 Improving Swift compile times

John Sundell

After diving into one of our largest Swift projects at Hyper, I managed to reduce the average build time for a clean build by 20%. This blog post is detailing how I did it.

Mar 3
Mar 3 Swift sequences: The art of being lazy

John Sundell

How to use custom, lazily evaluated sequences in Swift to improve performance and enable you to deal with larger datasets, such as entries in a database.

Feb 24
Feb 24 Type erasure using closures in Swift

John Sundell

How type erasure can be implemented using closures, and how it can help you work around using protocols with self or associated type requirements.

Feb 17
Feb 17 Providing a unified Swift error API

John Sundell

I’d like to share a technique that I’ve come to find quite useful when using Swift’s do, try, catch error handling model — to limit the amount of errors that can be thrown from a given API call.

 

Hi, I'm John! I build apps, games & Swift developer tools. On this blog I post weekly posts about Swift development techniques, frameworks and tips & tricks. You can also find me on Twitter and GitHub.

Theme: Light | Dark | Black
 
 

Powered by Squarespace