24 Nov 2024

Tag: swift

Programming

Property Wrappers 

First introduced in Swift 5.1, property wrappers allow us devs to add our own implementation details to a property before they are initialized. Currently, by delaying initialization we can declare a property as lazy, and then return our property when it’s first requested. Property wrappers...
Programming

Running Xcode Tests from CI 

The ability to run a suite of tests is a great way to cut down on manual testing time, whilst still having the knowledge that any new changes have not broken the codebase. There are a number of different options when it comes to writing...
Programming

Method Swizzling 

When anyone mentions swizzling I automatically get worried. Method swizzling is an Objective C runtime feature which allows for the switching of method implementations. This means any function can theoretically be switched out for another one at run time. The Objective C runtime has a...
Programming

WWDC 19 – Swift UI, Combine 

A full host of new features were announced at WWDC 2019, but there have been two features that have been getting more of a buzz than any others. Not since the announcement of Swift back in 2014, has Apple released something which could potentially change...
Programming

Importing Data into HealthKit 

This post carries on from Importing File Data, where we looked at how to import a GPX file, and parse it into useable objects. If you’ve not read the first part I would recommend doing so before continuing. Recap For a quick recap, we ended...
Programming

Importing File Data 

To try and combine my love for programming, with my passion for exercise, I’m currently in the process of writing an iOS app to help out with my triathlon training. In this post, I will cover how to register your app for external file types,...
Programming

I don’t want this Class! 

There are some very powerful features in the Objective-C runtime, so is this something we should be taking advantage of more? During my time as a developer, I have seen my fair share of examples where people have abused the Objective-C runtime to solve a...