Sipping Swift and Savouring Spain: 2023

Discover the vibrant world of iOS development and the rich culture of Rioja through our NSSpain Experience. Join us as we delve into top-quality insights, valuable connections with fellow engineers, and unforgettable moments in the heart of Logroño. NSSpain: Where iOS innovation meets the Rioja celebration.

avatar

Tymit Team

London, UK

NSSpain Experience

In the ever-evolving world of iOS development, the value of opportunities for learning and idea-sharing cannot be overstated. NSSpain stands out not just for its top-quality insights, but also for its platform to connect with fellow engineers. As someone who only recently joined Tymit, attending was about more than professional growth; it was a brilliant means to bond with new colleagues amidst the rich backdrop of the Rioja region. Nestled in the heart of Logroño, the conference was a mecca for iOS aficionados. Alongside thought-provoking sessions and engaging discussions, a standout event was our tour of a local winery, where the opportunity to ’sample’ wines was as enlightening as our tech talks. With the Rioja Wine Harvest Festival kicking off soon after, NSSpain wasn’t merely an educational retreat; it was a celebration of our craft within a vibrant cultural tapestry.

NSSpain Logo

Tymit's iOS Team

Highlights and Learnings

I won’t cover every talk in detail to keep this post succinct. They were all of a very high standard and recordings are being added to threads on Mastodon and the website formally known as Twitter. I will instead write a little about the talks which were most enlightening to me personally.

Building UI components with SwiftUI - Kasper Lahti

Already available to watch here, Kasper’s talk is invaluable to SwiftUI newcomers and veterans alike. It’s inspiring to observe the depth of customisation he achieves using the framework; his presentation thoroughly disproves the lingering notion that moving away from UIKit will lead to flexibility issues. Primarily, he covers numerous tips, ideas and warnings for implementing custom controls/widgets. Kasper has also written an article on the subject available on the Moving Parts blog.

Harnessing the Potential: Swift Macros in Action - Antoine van der Lee

Antoine’s talk was a great introduction to Swift Macros, focusing on their use cases rather than their implementation. His talk covers many specific macros, ranging from macros that simply perform some validation at compile time (#URL, which would check a url is valid before inserting forced unwrapping, URL(string: ...)!), to discussing Papyrus, a macro based HTTP client.

Bug-Free by Design - Crafting Swift Code That Doesn't Sting - Marina

Marina’s talk was a collection of tips with the shared theme of leaning on the compiler as much as possible to catch bugs before they’re a problem.

An idea which I’d not considered before, and my favourite take away from the whole conference, was using late let initialisation to help prevent code paths from being forgotten about, for example:

{
func spell(number: Int, completion: (String) -> Void) {
   switch number {
   case 0:
     completion("zero")
   case 1:
     break
   case 2:
     completion("two")
   default:
     completion("other")  
    }
}

This compiles fine, but if called with the number 1 then completion is never called! Hopefully, if this was a bug, it would be caught by good unit tests, however, we could have caught it earlier and made our code more robust by writing the function using late initialisation:

{
func spell(number: Int, completion: (String) -> Void) {
   let spelling: String
   switch number {
   case 0:
     spelling = "zero"
   case 1:
     break
   case 2:
     spelling = "two"
   default:
     spelling = "other"
   }
   completion(spelling) 
}

With this approach, we’ll get a nice error, “Constant ’spelling’ used before being initialized”, warning us that spelling hasn’t been initialised for all code paths.

An overview of different approaches to share code across platforms - Benedikt Terhechte

Benedikt’s talk was a very entertaining look at cross-platform solutions, and specifically, at using Rust to share business logic between iOS and Android, highlighting the similarities, and shared strengths, between Swift and Rust. As well as being both interesting and informative (I’ll be giving Rust a go in my own projects!), his talk could be an effective resource to show the next overzealous product person bringing up React Native .

The Temporal Axis of Space-Time - Dave DeLong

Dave's talk was a journey into the nuances and challenges of handling dates and time. The key message? Time is hard; lean on Calendar , the 'temporal map' provided by Foundation. For further insights, Dave also maintains yourcalendricalfallacyis.com.

In reflection

NSSpain 2023 was more than just a conference; it was an amalgamation of knowledge-sharing, cultural experiences, and forming connections within the iOS community. The talks I've highlighted only scratch the surface of the plethora of insights I gained. As I continue my journey at Tymit, I am eager to apply the knowledge and ideas gathered from these brilliant minds to drive innovation and enhance our user experiences. Until the next conference, I'll be diving deeper into SwiftUI, exploring Rust, and always remembering that time is, indeed, hard!

Share the news