Recent Xcode, iOS and Swift Blog posts

SVG Assets in Xcode for Single Scale Images

Xcode 12 introduced support for using Scalable Vector Graphic (SVG) image assets in iOS, macOS, and iPadOS. It's one of ...
Read More
/ Xcode

SF Symbols: The benefits and how to use them guide

SF Symbols were introduced during WWDC 2019 and are a big present for us developers. Apple basically gave us free ...
Read More
/ Swift

WWDC 2020: 7 Tips to prepare yourself

In less than a week we will know what WWDC 2020 has brought to us. Apple has been working hard ...
Read More
/ Optimization

@discardableResult in Swift explained: Ignoring return values

While writing methods in Swift you're often running into scenarios in which you sometimes want to ignore the return value ...
Read More
/ Swift

Core Data Performance: 6 tips you should know

Writing Core Data code with performance in mind helps to prepare your app for the future. Your database might be ...
Read More
/ Swift

Introducing GitBuddy: Changelog and Release manager for GitHub

It's been a few months since we released the initial version of GitBuddy but it's the right time now to ...
Read More
/ Workflow

Expressible literals in Swift explained by 3 useful examples

Expressible literals allow you to initialize types by making use of literals. There are multiple protocols available in the Swift ...
Read More
/ Swift

String Interpolation in Swift explained using 4 useful cases

Swift 5 introduced a decent version of string interpolation with SE-228 and updated the old version of the ExpressibleByStringInterpolation protocol ...
Read More
/ Swift

Using Custom debug descriptions to improve debugging

Custom debug descriptions can help you debug your own custom objects, structs, errors, and other types. Whenever you print out ...
Read More
/ DebuggingSwift

RocketSim: Enhancing the iOS Simulator for productivity

RocketSim is released and available from the Mac App Store as of today. It all started with building a productivity ...
Read More
/ Workflow

URLs in Swift: Common scenarios explained in-depth

URLs are everywhere in an app we built. We reference local files using bundle paths, we fetch data from a ...
Read More
/ Swift

SwiftUI Previews: Validating views in different states

SwiftUI Previews allow us to develop a lot faster as we can now preview our views live in Xcode. Whenever ...
Read More
/ SwiftUIXcode

Custom Operators in Swift with practical code examples

Custom operators in Swift can make your code easier to read and simpler to maintain. Code can be written less ...
Read More
/ Swift

Custom subscripts in Swift explained with code examples

Custom subscripts in Swift allow you to write shortcuts to elements from collections or sequences and can be defined within ...
Read More
/ Swift

NSFetchedResultsController extension to observe relationship changes

Apple provides us with great classes like the NSFetchedResultsController to interact with Core Data databases in our apps. The API ...
Read More
/ Swift

Testing private methods and variables in Swift

Testing private methods and variables is often something we run into when writing tests for our applications. You could think ...
Read More
/ Swift

How to mock Alamofire and URLSession requests in Swift

Mocking data requests that are triggered by either Alamofire or URLSession is something we all run into when we start ...
Read More
/ Swift

Creating a command line tool using the Swift Package Manager

A command-line tool can be very useful for automating common tasks to boost developer productivity. While developing iOS applications we ...
Read More
/ Swift

Authentication with signed requests in Alamofire 5

With more than 30k stars on Github, you can tell that Alamofire is a popular framework to use for iOS ...
Read More
/ Swift

Testing push notifications on the iOS simulator

Testing push notifications in the iOS simulator make it a lot easier to add support for remote notifications. You often ...
Read More
/ Workflow

Swift Package Manager framework creation in Xcode

Swift Package Manager is Apple's answer for managing dependencies. We're all familiar with tools like CocoaPods and Carthage but it's ...
Read More
/ Swift

Unique values in Swift: Removing duplicates from an array

Removing duplicates to get unique values out of an array can be a common task to perform. Languages like Ruby ...
Read More
/ Swift

JSON Parsing in Swift explained with code examples

JSON parsing in Swift is a common thing to do. Almost every app decodes JSON to show data in a ...
Read More
/ Swift

Ranges in Swift explained with code examples

Ranges in Swift allow us to select parts of Strings, collections, and other types. They're the Swift variant of NSRange ...
Read More
/ Swift

EXC_BAD_ACCESS crash error: Understanding and solving it

Building apps all goes well in the beginning. You're developing an app from scratch, it's stable, and runs perfectly fine ...
Read More
/ Swift

SwiftLee 2019 in review: Top Swift Development blog posts

You know it's been a great year if you have the feeling that it went really fast. After looking back ...
Read More
/ Swift

No space left on device: Testing low storage scenarios

No space left on device is an error message that starts to show up more lately. Over the years, storage ...
Read More
/ Debugging

4 Tips to make it easier to fix crashes and bugs

Each app comes with performance issues, crashes, and bugs to fix. Although we try our very best we will always ...
Read More
/ OptimizationWorkflow

Advanced asynchronous operations by making use of generics

Asynchronous operations allow you to write long-running tasks in a distinct matter while being able to add dependencies between several ...
Read More
/ Swift

Asynchronous operations for writing concurrent solutions in Swift

Asynchronous operations allow executing long-running tasks without having to block the calling thread until the execution completes. It's a great ...
Read More
/ Swift

Getting started with Operations and OperationQueues in Swift

Operations in Swift are a powerful way to separate responsibilities over several classes while keeping track of progress and dependencies ...
Read More
/ Swift

Thread Sanitizer explained: Data Races in Swift

The Thread Sanitizer, also known as TSan, is an LLVM based tool to audit threading issues in your Swift and ...
Read More
/ SwiftXcode

Concurrent vs Serial DispatchQueue: Concurrency in Swift explained

Concurrent and Serial queues help us to manage how we execute tasks and help to make our applications run faster, ...
Read More
/ Swift

Dark Mode: Adding support to your app in Swift

Dark Mode was introduced in iOS 13 and announced at WWDC 2019. It adds a darker theme to iOS and ...
Read More
/ SwiftXcode

Core Data and App extensions: Sharing a single database

Core Data got better and better over the years with improved APIs that make it easier to work with. The ...
Read More
/ Swift

Auto Layout in Swift: Writing constraints programmatically

Auto Layout constraints allow us to create views that dynamically adjust to different size classes and positions. The constraints will ...
Read More
/ Swift

Optionals in Swift explained: 5 things you should know

Optionals are in the core of Swift and exist since the first version of Swift. An optional value allows us ...
Read More
/ Swift

Mastering the assistant editor in Xcode 11

Xcode 11 was introduced during WWDC 2019 and contained improvements in the way the assistant editor works. If you're using ...
Read More
/ WorkflowXcode

5 Xcode breakpoints tips you might not yet know

Xcode breakpoints allow us to debug and find out solutions for nasty bugs. Without breakpoints, it would be a fun ...
Read More
/ DebuggingXcode

Rich notifications on iOS explained in Swift

Rich notifications on iOS allow us to make the boring default notification just a little nicer by adding images, GIFs, ...
Read More
/ Swift

Picking your minimum iOS version to support

When a new iOS version arrives it's oftentimes a moment to reflect on the supported iOS versions and see to ...
Read More
/ Workflow

Unit tests best practices in Xcode and Swift

Writing unit tests is just as important as writing your application code. Unit tests are oftentimes the first to be ...
Read More
/ SwiftXcode

Struct vs classes in Swift: The differences explained

Swift brings us classes and structs which both can look quite similar. When should you use a struct and when ...
Read More
/ Swift

Xcode Instruments usage to improve app performance

Xcode Instruments is a developer tool that comes for free with Xcode. It has a lot of useful tools to ...
Read More
/ DebuggingXcode

Error handling in Combine explained with code examples

Once you get started with Combine you'll quickly run into error handling issues. Each Combine stream receives either a value ...
Read More
/ CombineSwift

Array vs Set: Fundamentals in Swift explained

An Array and a Set seem to be quite the same in the beginning. They're both collection types and have ...
Read More
/ Swift

Xcode refactoring options explained with examples

A brand new Xcode refactoring engine was introduced in Xcode 9. Although this is quite a few Xcode versions ago ...
Read More
/ SwiftWorkflow

Unused images and resources clean up in Xcode

Unused images can exist as a result of iterations in a project. Once a feature is no longer needed and ...
Read More
/ OptimizationXcode

UIKeyCommand how-to add keyboard shortcuts & speed up your workflow

The UIKeyCommand class allows you to add keyboard shortcuts to your app. Although they might seem useful for iPad only, ...
Read More
/ SwiftWorkflow

Combine debugging using operators in Swift

Combine debugging can be hard with long stack traces which don't help at all. Asynchronous callbacks follow up on each ...
Read More
/ CombineDebuggingSwift

Creating a custom Combine Publisher to extend UIKit

A Custom Combine Publisher can add missing functionalities to UIKit elements you use every day. A lot of boilerplate code ...
Read More
/ CombineSwift

Getting started with the Combine framework in Swift

Combine is a new framework by Apple introduced at WWDC 2019. The framework provides a declarative Swift API for processing ...
Read More
/ CombineSwift

Using Xcode Previews with existing views without using SwiftUI

Xcode Previews have been added in Xcode 11 and allow you to quickly preview the current state of your view ...
Read More
/ Xcode

Dynamic Member Lookup combined with key paths in Swift

Dynamic member lookup has been introduced in Swift 4.2 with SE-195 and already allowed some pretty nice solutions to for example ...
Read More
/ Swift

Property wrappers to remove boilerplate code in Swift

Property wrappers were first introduced during WWDC 2019 and come with Xcode 11 in Swift 5. It's a neat addition ...
Read More
/ Swift

Try catch throw: implementing Error Handling in Swift

Try catch in Swift combined with throwing errors make it possible to nicely handle any failures in your code. A ...
Read More
/ Swift

Using NSBatchDeleteRequest to delete batches in Core Data

An NSBatchDeleteRequest can be used to efficiently delete a batch of entries from a Core Data SQLite persistent store. It runs ...
Read More
/ Swift

Weak self and unowned self explained in Swift

Weak self and unowned self in Swift for many of us are hard to understand. Although Automatic Reference Counting (ARC) ...
Read More
/ Swift

Self-documenting code to improve readability in Swift

Self-documenting code can improve the readability of your codebase. It basically means that you don't have to write comments to ...
Read More
/ Swift

Typealias usage in Swift

A typealias in Swift is literally an alias for an existing type. Simple, isn't it? They can be useful in ...
Read More
/ Swift

URLSession: Common pitfalls with background download & upload tasks

URLSession enables you to download and upload from the background. Although the basics seem to be easy, it's quite hard ...
Read More
/ Swift

Developer productivity boost with Google Search Tips & Tricks

Developer productivity is important to deliver your project on time. There's a lot you can do as I already described ...
Read More
/ Optimization

@unknown default usage with enums in Swift

@unknown default has been introduced in Swift 5 with SE-0192. It's a new addition to the way we can work ...
Read More
/ Swift

Swift 5.0: How to migrate your project and frameworks

Swift 5.0 has been released in March 2019 and is the first ABI stable Swift release. Although a lot of ...
Read More
/ Swift

WWDC First timer tips: How to get the most out of it

WWDC first timer tips help you to get the most out of Apple's World Wide Developer Conference. This conference takes place ...
Read More
/ WWDC

Blog about Swift: Tips and ideas to start your own

How to start your own Swift blog? It's a question I get asked more and more. I've given some tips ...
Read More
/ Swift

Unused localized strings clean up from a Strings file

Strings files are used for localization in iOS and MacOS apps. These files can grow over time and make it ...
Read More
/ Xcode

Fileprivate vs private in Swift: The differences explained

Fileprivate and private are part of the access control modifiers in Swift. These keywords, together with internal, public, and open, ...
Read More
/ Swift

Required keyword usage in Swift classes and structs

The required keyword in Swift can be used in front of initializers in Swift. Its usage is simple and it's ...
Read More
/ Swift

Speeding up development: a collection of tips

Speeding up development to increase productivity can bring you a lot. You'll work more efficient, deliver faster, and you'll feel ...
Read More
/ OptimizationWorkflow

Danger plugins to speed up code reviews

Danger plugins can help improve something we do every day: code reviews. Code reviews inside pull requests help you to ...
Read More
/ Optimization

Alamofire vs URLSession: a comparison for networking in Swift

Alamofire and URLSession both help you to make network requests in Swift. The URLSession API is part of the foundation framework, whereas ...
Read More
/ Swift

How to use for loop, for each, while, and repeat in Swift (in-depth)

For loop, for each, and repeat are examples of control flow statements in Swift. Although most of them look similar, ...
Read More
/ Swift

Enum explained in-depth with examples in Swift

Enum usage in Swift: If case, guard case, fallthrough, and the CaseIteratable protocol. These are all terms which could sound familiar ...
Read More
/ Swift

Memory leaks prevention using an autoreleasepool in unit tests

Memory leaks often happen without notice. Although best practices like using a weak reference to self inside closures help a ...
Read More
/ Swift

QR Code generation with a custom logo and color using Swift

A QR Code is used a lot to share content or to add a new user in apps like Twitter ...
Read More
/ Swift

Cheat sheet examples for Xcode and Swift development

A cheat sheet can be a handy tool to quickly reference Xcode, Swift or iOS logic from a compact overview ...
Read More
/ WorkflowXcode

SwiftLee 2018 in review: Top Swift Development blog posts

With 2019 coming closer it's time to review SwiftLee in 2018 and list the top swift development blog posts of ...
Read More
/ GeneralSwift

Simulator tools to get more out of the simulator

Especially the rulers can help you stop using the Mac screenshot pixel feedback to measure distance in your UI. Simulator ...
Read More
/ DebuggingWorkflow

Implementing Siri support using NSUserActivity, intents and shortcuts

Siri support can be added using an Intent and an IntentUI extension. This adds quite some overhead and is not ...
Read More
/ Swift

Speeding up with Xcode Behaviors

Xcode behaviors can change the way how Xcode responds to certain events. Default behaviors help you already by showing for ...
Read More
/ OptimizationXcode

UI Debugging by making use of third-party apps

Although Xcode brings us the Debug View Hierarchy tool , it's often not enough for more advanced UI debugging. Luckily ...
Read More
/ DebuggingWorkflow

App Store Connect API adoption with use case examples

The new App Store Connect API was announced during WWDC 2018 and makes it possible to write applications for App ...
Read More
/ Swift

OSLog and Unified logging as recommended by Apple

OSLog as a replacement of print and NSLog is the recommended way of logging by Apple. It's a bit harder ...
Read More
/ DebuggingWorkflow

Shortcuts essentials in Xcode to speed up your workflow

Making use of essential shortcuts in Xcode can speed up development and keep you in your flow. Xcode allows you ...
Read More
/ WorkflowXcode

Measure the performance of code in Swift

It's important in any type of programming language to know how to measure the performance of code as there are ...
Read More
/ OptimizationSwift

Performance, functional programming and collections in Swift

Functional programming is often done in Swift and so easy that it could easily hit performance. Iterating over large collections ...
Read More
/ OptimizationSwift

SwiftLint valuable opt-in rules to improve your code

SwiftLint is a tool by Realm to enforce Swift style and conventions. It's proven to be adopted by a lot ...
Read More
/ OptimizationSwift

Updating to Swift 4.2

Swift 4.2 is a major release and shipped with Xcode 10. It comes with a lot of code improvements for ...
Read More
/ Swift

Command-click on code options and possibilities in Xcode

Command-click no longer jumps to definition by default since Xcode 9 is introduced. It opens up a handy menu instead ...
Read More
/ Xcode

Defer usage in Swift

Although the defer keyword was already introduced in Swift 2.0, it's still quite uncommon to use it in projects. Its ...
Read More
/ Swift

CompactMap vs flatMap: The differences explained

CompactMap and flatMap, what are the differences and when do you use each? Swift 4.1 introduced this new method with ...
Read More
/ Swift

Effective development by improving the daily routine as a developer

Effective development can be achieved by learning more skills, but also by improving the daily routine for you as a ...
Read More
/ OptimizationWorkflow

Compiler Diagnostic Directives using a hashtag in Swift

The Swift standard library brings quite some compiler diagnostic directives by default. Although this might not ring a bell at ...
Read More
/ DebuggingSwift

Where usage in Swift

Where is a powerful keyword within Swift to easily filter out values. It can be used in many different variants ...
Read More
/ Swift

Debugging breakpoints as a replacement for prints

Debugging breakpoints in Xcode allows you to replace prints and reuse debugging statements in future debugging sessions. By simply enabling ...
Read More
/ Debugging

Typed notifications using custom extensions

The Swift API contains a lot of notifications sent out by the system like NSManagedObjectContextObjectsDidChange in Core Data or the ...
Read More
/ Swift

Using the Network Link Conditioner Utility (how-to)

The Network Link Conditioner on iOS and macOS enables you to test your app in networking conditions like your users ...
Read More
/ DebuggingOptimization

Build performance analysing in Xcode 10

Xcode 10 provides new ways to analyse your build performance. Gather valuable insights into your build performance using the new ...
Read More
/ OptimizationXcode

Core Data Debugging in Xcode using launch arguments

Core Data is Apple’s object graph management and persistency framework for iOS, macOS, watchOS, and tvOS. It's around for a ...
Read More
/ Debugging

Using Xcode custom file templates with GIT

Xcode custom file templates are a great way to develop just a bit faster and enable you to define a ...
Read More
/ WorkflowXcode

Useful less known Xcode tips to improve your workflow

Xcode is the main IDE for developing software for macOS, iOS, watchOS, and tvOS. It contains a lot of well-known ...
Read More
/ WorkflowXcode

App Store Optimization for your App Store Page

App Store Optimization can help people discover your app on the App Store for iPhone and iPad. With some useful ...
Read More
/ Optimization

Enabling newly added opt-in features in Xcode 10

During WWDC 2018 Apple announced Xcode 10 with a lot of new features. Many of them are available for you ...
Read More
/ WWDCXcode

Printing data requests using a custom URLProtocol

Almost all apps contain some kind of data requests. Printing data requests could sometimes be handy for debugging purposes. This ...
Read More
/ Swift

Controlling Progress children by adding remove

Controlling Progress children by default makes it only easy to add children to a Progress instance, but removing is not ...
Read More
/ Swift

Share Extension UI Tests written in Swift

UI Tests are a great tool to validate your application. It is easy to create them for your main application, ...
Read More
/ Swift

Fixing crashes with Firebase Crashlytics

Using Firebase Crashlytics can help you to solve your crashes faster. In this example we're going to dive into a ...
Read More
/ Workflow

Capture iOS simulator video for App Preview

Creating an app preview video can be really easy using the simulator in just a few steps. Capturing an iOS ...
Read More
/ Workflow

Symbolicate crashlogs with Xcode 9 and Bitcode

You can symbolicate a crash log with Xcode 9 fairly easy. Even with bitcode, which give you multiple DSYM files ...
Read More
/ Xcode

Updating to Swift 4.1

Swift 4.1 is released on the 29th of March and will be shipped with Xcode 9.3. Although it's a minor ...
Read More
/ Swift

How to get iOS reviews with 4+ stars for your app

Last May the new Buienradar app went live. With over 2 million users each month, it's one of the biggest ...
Read More
/ Optimization

Optional protocol methods in Swift

In Swift it's kind of unsupported to implemented optional protocol methods. You can, which is ugly, use the @objc syntax: ...
Read More
/ Swift

Launch time performance optimization

Time for a small post about launch time performance optimization. I did some research in improving the launch time of ...
Read More
/ Optimization

OptionSet usage in Swift like NS_OPTIONS

Swift 3.0 introduced the OptionSet protocol after renaming from OptionSetType. It is a Swift alternative to the well-known and often used ...
Read More
/ Swift

WWDC First timers tips collection top 10

Again, I'm very happy to be one of the few developers to visit WWDC this year. I'm a first timer ...
Read More
/ WWDC

The start of a new blog

Hi there! After thinking a lot of starting my own blog, I've finally made the decision to create one! As ...
Read More
/ Swift