[ iOS and Swift ]
Installing and running Swift tools with enforced versions
When working on Swift projects we want to ensure that tools such as SwiftLint or Sourcery are easy to use and that all developers are using the same version. Let's look at some different options and how we can enforce consistent versioning.
Manage automation tasks using Swift Package Manager
To perform automation tasks on Swift projects, such as linting and code formatting, we often need to use command line tools or run scripts. Let's install them and manage it all with Swift Package Manager instead!
Dealing with file extensions and Uniform Type Identifiers
Storing OSLog instances as an extension in order to provide them using a shorthand syntax.
Clear and searchable logging in Swift with OSLog
Logging is a useful tool for diagnosing issues and working out what an app is doing. We will explore Apple's currently recommended way of logging via OSLog, covering how to use it and managing its differences when compared to other logging approaches.
Simpler categories when using OSLog
Storing OSLog instances as an extension in order to provide them using a shorthand syntax.
Create Xcode file templates and share them with your team
When creating new files in Xcode the built-in templates often contain code we immediately delete or need to alter. We will explore the process of creating our own templates and how to go about sharing them with the rest of our team members.
Map the keys of a dictionary to a different type
Transforming the type of keys in a dictionary using a handy map function.
Using anchors to match a parent view's constraints
A Swift extension to attach a view's anchors to another view including insets.
Animating view colour changes
How to apply animations to text or background colour changes on a Swift view.
Create time intervals with explicit units
Extending TimeInterval in Swift can make clearer and more readable code.