Give your simulator superpowers

RocketSim: An Essential Developer Tool
as recommended by Apple

Win a Let's visionOS 2024 conference ticket. Join for free

Recent Xcode, iOS and Swift Blog posts

Test-Driven Development (TDD) for bug fixes in Swift

Test-driven development (TDD) is a technique that requires you first to write a failing test before you start implementing a ...
/ Workflow

Optionals in Swift explained: 5 things you should know

Optionals are in the core of Swift and have existed since the first version of Swift. An optional value allows ...
/ Swift

Third-party libraries acknowledgments using a Settings bundle

Third-party libraries help developers build apps faster but often come with a license. The MIT license is likely the most ...
/ Workflow

Extensions in Swift: How and when to use them

Extensions in Swift allow you to extend an existing class, struct, enumeration, or protocol with new functionality. Whether it's a ...
/ Swift

How to use @ScaledMetric in SwiftUI for Dynamic Type support

The @ScaledMetric property wrapper in SwiftUI allows you to adopt custom values to dynamic type settings. Your custom values will ...
/ SwiftUI

App Preview Videos Capturing using the Xcode simulator

App Preview Videos allow you to increase the visibility of your app in the App Store. While it's best to ...
/ Workflow

Status bar overrides in the iOS Simulator

Status bar overrides in the iOS Simulator allow you to change the appearance of the network, cellular, time, and battery ...
/ Workflow

ScrollView Bounce Behavior configuration in SwiftUI

A ScrollView bounce behavior configuration allows you to define whether a scrollable view bounces when reaching the end of its ...
/ SwiftUI

Concurrency-safe global variables to prevent data races

Concurrency-safe global variables help you prevent data races and allow you to solve strict-concurrency-related warnings. Since you can access global ...
/ Concurrency

@Observable Macro performance increase over ObservableObject

The @Observable Macro was first introduced during WWDC 2023 to replace ObservableObject and its @Published parameters. The macro allows you ...
/ SwiftUI

Swift Newsletters: How to stay up to date as an app developer

Following the Swift Evolution can be time-consuming, but Swift newsletters enable you, as an app developer, to stay current. The ...
/ Optimization

SwiftLee 2023: A Year in Review

Time flies when you're having fun, and 2023 has definitely been one of those years. It's been a year full ...
/ General

Using campaign links to track impressions, downloads, and sales

Campaign links open your App Store product page and allow you to track the performance of your marketing channels. As ...
/ Optimization

Symbolicate crash logs with Xcode

When you receive an unreadable crash report, you can symbolicate crash logs with the help of Xcode. As a developer, ...
/ Xcode

SFSafariViewController in SwiftUI: Open webpages in-app

SFSafariViewController can be used to let your users open webpages in-app instead of in an external browser. While the view ...
/ SwiftUI

Swift Evolution: Reading and learning from proposals

The Swift Programming Language constantly evolves, and most of its changes result from public proposals inside the Swift Evolution repository ...
/ Swift

Unit testing async/await Swift code

Unit tests allow you to validate code written using the latest concurrency framework and async/await. While writing tests doesn't differ ...
/ Concurrency

Debugging SwiftUI views: what caused that change?

Debugging SwiftUI views is an essential skill when writing dynamic views with several redrawing triggers. Property wrappers like @State and ...
/ DebuggingSwiftUI

RocketSim 12.0: Builds Apps Faster

RocketSim is a developer tool that gives your Xcode Simulator extra functionalities to increase day-to-day development productivity. A floating window ...
/ Xcode

Promotional offers: Increase App Revenue using discounts

Promotional offers allow you to increase the revenue for your app by promoting a user's subscription to a new offer ...
/ Optimization

User Defaults reading and writing in Swift

User Defaults are the go-to solution for Swift applications to store preferences that persist across launches of your app. It's ...
/ Swift

Thread dispatching and Actors: understanding execution

Actors ensure your code is executed on a specific thread, like the main or a background thread. They help you ...
/ ConcurrencySwift

@preconcurrency: Incremental migration to concurrency checking

The @preconcurrency attribute is part of the tools that help you incrementally migrate to strict concurrency checking. When async/await was ...
/ Concurrency

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 ...
/ Workflow

Value and Type parameter packs in Swift explained with examples

Type parameter packs and value parameter packs allow you to write a generic function that accepts an arbitrary number of ...
/ Swift

App Intent driven development in Swift and SwiftUI

App Intent driven development can help you architect your code for reusability. An app intent allows you to define an ...
/ Swift

If and switch expressions in Swift

Swift 5.9 introduced if and switch expressions that allow you to write shorter code by omitting the return keyword. The ...
/ Swift

Predicate Macro in Swift for filtering and searching

#Predicate is a new Macro available since Swift 5.9 and Xcode 15, allowing you to filter or search a data ...
/ Swift

SwiftSyntax: Parse and Generate Swift source code

SwiftSyntax is a collection of Swift libraries that allow you to parse, inspect, generate, and adjust Swift source code. It ...
/ Swift

Swift 6: Preparing your Xcode projects for the future

Swift 6 will be the next major release of Apple's programming language and aims to create a fantastic development experience ...
/ Concurrency

Build performance analysis for speeding up Xcode builds

Build performance can be analyzed in Xcode to speed up your builds. This can quickly speed up your workflow and ...
/ OptimizationXcode

Xcode Debug Console Tour: Exploring All Options

The Xcode Debug Console allows you, as a developer, to explore logs and debug issues with your apps. All your ...
/ Xcode

Localization testing in Xcode

Localization testing becomes vital if your apps are localized in multiple languages. You want to ensure your UI looks good ...
/ Xcode

OSLog and Unified logging as recommended by Apple

OSLog is a replacement for print, and NSLog and Apple's recommended way of logging. It has different logging levels, like ...
/ DebuggingWorkflow

@backDeployed to extend function availability to older OS releases

The @backDeployed attribute in Swift allows you to extend function availability back to older OS versions. It's beneficial for framework ...
/ Swift

App Intents Spotlight integration using Shortcuts

App Intents have been new since iOS 16 and offer a programmatic way to service your app's content and functionality ...
/ SwiftUI

#Preview SwiftUI Views using Macros

Starting with Xcode 15 and Swift 5.9, you can create previews for your SwiftUI view using the new #preview Macro ...
/ Xcode

Xcode Bookmarks: Save code landmarks & organize tasks

Xcode Bookmarks were introduced during WWDC 2023 as part of the significant Xcode 15 release. They are a new feature ...
/ Xcode

Swift Macros: Extend Swift with New Kinds of Expressions

Swift Macros got introduced in the WWDC 2023 release of Swift 5.9. They are a new way for you to ...
/ Swift

ContentUnavailableView: Handling Empty States in SwiftUI

ContentUnavailableView is a SwiftUI view introduced in iOS 17 during WWDC 2023. It allows you to handle cases of networking ...
/ SwiftUI

Share Swift Code between Swift On Server Vapor and Client App

Sharing Swift code between a backend and client app is one of the benefits you'll get when working with Swift ...
/ Swift

10 Tips to Get Your App Featured on the App Store

Getting your app featured on the App Store allows you to gain organic growth and more reach. Users can find ...
/ Optimization

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 ...
/ Swift

Universal Links implementation on iOS

Universal Links allow you to link to content inside your app when a user opens a particular URL. Webpages will ...
/ SwiftUI

MainActor usage in Swift explained to dispatch to the main thread

MainActor is a new attribute introduced in Swift 5.5 as a global actor providing an executor which performs its tasks ...
/ ConcurrencySwift

Optimizing your app for Network Reachability

Network Reachability is a vital aspect of apps that use some networking capabilities. Your users won't always have a good ...
/ Swift

Deeplink URL handling in SwiftUI

Deeplinks allow you to open your app and navigate into a specific location right after launch. An example could be ...
/ SwiftUI

Network Extension Debugging on macOS

A Network Extension on macOS allows you to create content filters, DNS proxies, and more. They integrate nicely into the ...
/ Debugging

Running Xcode on top of iPad

Using the latest Xcode 14.3 and the iPad Pro (12.9 Inch) with iOS 16.4 beta, I've been able to run ...
/ Xcode

Location Simulation in Xcode’s Simulator

Location Simulation is a critical feature for apps that provide location access. You want to mimic the environment of real ...
/ Workflow

The operation couldn’t be completed: solving errors in Swift

"The operation couldn't be completed" is a common error to receive from Apple's standard SDKs or 3rd party libraries. The ...
/ Swift

Equatable conformance in Swift explained with code examples

Equatable conformance allows you to compare one object with another. Based on whether the objects match, you can perform a ...
/ Swift

View Composition using ViewModifiers in SwiftUI

View Composition allows you to create reusable components to create enriched views. You can extract logic into reusable components using ...
/ SwiftUI

Introducing Roadmap: Offer Public Feature Voting

Roadmap is a new open-source framework written completely in Swift and SwiftUI, allowing you to integrate feature voting functionality for ...
/ SwiftUI

Detached Tasks in Swift explained with code examples

Detached tasks allow you to create a new top-level task and disconnect from the current structured concurrency context. You could ...
/ ConcurrencySwift

Xcode Simulator Directories Exploration

Xcode Simulator directories allow you to find related files for your app. Unlike on a real device, you can access ...
/ OptimizationXcode

Testing push notifications on the iOS simulator

Testing push notifications in the iOS simulator make adding support for remote notifications much more effortless. You often must iterate ...
/ Workflow

Task Groups in Swift explained with code examples

Task Groups in Swift allow you to combine multiple parallel tasks and wait for the result to return when all ...
/ ConcurrencySwift

Engineering goals: How to become a more successful developer

Engineering goals create focus and help you achieve the milestones of becoming a successful developer. You'll know better what you've ...
/ Optimization

Enum explained in-depth with code examples in Swift

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

SwiftLee 2022: A Year in Review

Another year passed by, and we're close to getting into 2023. It's been a year with a single Swift 5.7 ...
/ General

OptionSet in Swift explained with code examples

OptionSet in Swift allows you to define a set of options for configurations. It's the Swift variant of the well-known ...
/ Swift

How to use FormatStyle to restrict TextField input in SwiftUI

A custom FormatStyle can help you control the allowed characters of a SwiftUI TextField. You might want to allow numbers ...
/ SwiftUI

Sheets in SwiftUI explained with code examples

Sheets in SwiftUI allow you to present views that partly cover the underlying screen. You can present them using view ...
/ SwiftUI

@dynamicCallable in Swift explained with code examples

It's all in the name: @dynamicCallable in Swift allows you to dynamically call methods using an alternative syntax. While it's ...
/ Swift

Binary Targets in Swift Package Manager

Binary Targets in Swift Package Manager (SPM) allow packages to declare xcframework bundles as available targets. The technique is often ...
/ OptimizationSwift

Result builders in Swift explained with code examples

Result builders in Swift allow you to build up a result using 'build blocks' lined up after each other. They ...
/ Swift

Getting started with Unit Tests in Swift

Unit tests in programming languages ensure that written code works as expected. Given a particular input, you expect the code ...
/ SwiftXcode

Refactoring Swift: Best Practices to succeed

Refactoring code is part of the journey toward building sustainable apps. Whether you're experienced or not: every developer refactors their ...
/ Optimization

Announcing the SwiftLee Talent Collective

Today I'm excited to introduce you to the SwiftLee Talent Collective — an initiative to connect engineers with exciting companies ...
/ Swift

Alternate App Icon Configuration in Xcode

Adding alternate app icons to your app allows users to customize their home screen with an app icon that fits ...
/ SwiftSwiftUI

Never keyword in Swift: return type explained with code examples

The Never type in Swift allows you to tell the compiler about an exit point in your code. It's a ...
/ Swift

Side Projects: 10 Tips for being successful

It's common to have a side project as an engineer since we can build our ideas. At the same time, ...
/ OptimizationWorkflow

Deadlocks in Swift explained: detecting and solving

Deadlocks in Swift can make your app hang, causing a frustrating situation for both you and your users. Your app ...
/ DebuggingSwift

Variable WidgetBundle configuration based on conditions

The WidgetBundle protocol inside WidgetKit allows you to configure supported widgets for your apps. Whenever you add one or more ...
/ SwiftUI

Accessibility in SwiftUI explained for UIKit developers

Adding accessibility support in SwiftUI will be more approachable for you compared to UIKit. But still, if you’ve been sharpening ...
/ SwiftUI

VoiceOver navigation improvement tips for SwiftUI apps

VoiceOver navigation support in your apps comes with the same requirements as navigating through touch controls. When navigating apps with ...
/ SwiftUI

@ViewBuilder usage explained with code examples

The @ViewBuilder attribute is one of the few result builders available for you to use in SwiftUI. You typically use ...
/ SwiftUI

Faster StoreKit testing by syncing in-app purchase products

StoreKit testing in the Simulator allows you to speed up testing in-app purchases for your app. You can test in-app ...
/ Xcode

Shared with You implementation and testing explained

iOS 16 introduced Shared with You allowing you to showcase content shared in Messages inside your app. Users can find ...
/ Swift

Sendable and @Sendable closures explained with code examples

Sendable and @Sendable are part of the concurrency changes that arrived in Swift 5.5 and address a challenging problem of ...
/ ConcurrencySwift

UIViewRepresentable explained to host UIView instances in SwiftUI

Adopting the UIViewRepresentable protocol allows you to host UIView instances in SwiftUI. Your SwiftUI code is converted to UIKit views ...
/ SwiftUI

URLSessionConfiguration: Exploring opt-in configurations

URLSessionConfiguration can be used to initialize URLSession instances in Swift. While in most cases, you'll likely use the default configuration, ...
/ Swift

App Store Connect API SDK in Swift: Creating Developer Tools

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

Generics in Swift explained with code examples

Generics in Swift allows you to write generic and reusable code, avoiding duplication. A generic type or function creates constraints ...
/ Swift

Existential any in Swift explained with code examples

Existential any allows you to define existential types in Swift by prefixing a type with the any keyword. In short, ...
/ Swift

Some keyword in Swift: Opaque types explained with code examples

The some keyword in Swift declares opaque types, and Swift 5.1 introduced it with support for opaque result types. Many ...
/ Swift

Using NavigationLink programmatically based on binding in SwiftUI

NavigationLink in SwiftUI allows pushing a new destination view on a navigation controller. You can use NavigationLink in a list ...
/ SwiftUI

App Icon Generator is no longer needed with Xcode 14

An App Icon Generator generates all required app icon sizes based on a single-size icon input file. Creating and dragging ...
/ OptimizationXcode

Increase App Ratings by using SKStoreReviewController

SKStoreReviewController allows asking your users for App Store ratings from within the app. Positive ratings can help your app stand ...
/ OptimizationSwift

Markdown rendering using Text in SwiftUI

SwiftUI comes with built-in markdown support for text, making it easy to transform the text into bold, italic, and other ...
/ SwiftUI

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 ...
/ Swift

AsyncSequence explained with Code Examples

AsyncSequence is part of the concurrency framework and the SE-298 proposal. Its name implies it's a type providing asynchronous, sequential, ...
/ ConcurrencySwift

AsyncThrowingStream and AsyncStream explained with code examples

AsyncThrowingStream and AsyncStream are part of the concurrency framework introduced in Swift 5.5 due to SE-314. Async streams allow you ...
/ ConcurrencySwift

Downloading and Caching images in SwiftUI

Downloading and caching images is an essential part of building apps in Swift. There are several ways of downloading images ...
/ SwiftUI

Using MetricKit to monitor user data like launch times

The MetricKit framework allows us to collect all kinds of data from our end users, including launch times and hang ...
/ Swift

Disable animations on a specific view in SwiftUI using transactions

Animations in SwiftUI look great and make your app shine, but sometimes you want to disable animations on a specific ...
/ SwiftUI

Error alert presenting in SwiftUI simplified

Presenting error alerts in apps is essential to communicate failures to your end-users. The happy flow of apps is often ...
/ SwiftUI

AnyObject, Any, and any: When to use which?

AnyObject and Any got a new option any as introduced in SE-355, making it harder for us developers to know ...
/ Swift

How to use the #available attribute in Swift

Marking pieces of code as available or unavailable per platform or version is required in the ever-changing landscape of app ...
/ Swift

@Published risks and usage explained with code examples

@Published is one of the property wrappers in SwiftUI that allows us to trigger a view redraw whenever changes occur ...
/ CombineSwiftUI

@StateObject vs. @ObservedObject: The differences explained

The @StateObject and @ObservedObject property wrappers tell a SwiftUI view to update in response to changes from an observed object ...
/ SwiftUI

How to use the Redacted View Modifier in SwiftUI with useful extensions

The redacted view modifier in SwiftUI allows us to create a so-called skeleton view while our data is loading. Using ...
/ SwiftUI

@EnvironmentObject explained for sharing data between views in SwiftUI

@EnvironmentObject is part of the family of SwiftUI Property Wrappers that can make working with SwiftUI views a little easier ...
/ SwiftUI

Self-documenting code in Swift to increase readability

Self-documenting code helps explain a piece of code to other developers on a project without the need for actual documentation ...
/ Swift

Tasks in Swift explained with code examples

Tasks in Swift are part of the concurrency framework introduced at WWDC 2021. A task allows us to create a ...
/ ConcurrencySwift

Guard statements in Swift explained with code examples

Guard statements in Swift allow us to implement checks into our code that prevents the current scope from continuing. When ...
/ Swift

Writing Swift Articles: Tips to become a better writer

Writing Swift articles is a great way to become a better engineer and is often seen as a required skill ...
/ Optimization

Swift in 2021: A Year in Review

One of the best years for Swift is close to reaching its end. Time flies when you're having fun, and ...
/ General

Reflection in Swift: How Mirror works

Reflection in Swift allows us to use the Mirror API to inspect and manipulate arbitrary values at runtime. Even though ...
/ Swift

RunLoop.main vs DispatchQueue.main: The differences explained

RunLoop.main and DispatchQueue.main are often used as schedulers within Combine. During code reviews, I often encounter inconsistency in using one ...
/ Combine

Creating an App Update Notifier using Combine and async/await

An app update-notifier promotes a new app update to your users. Using a notifier will get better adoption rates with ...
/ Swift

Non-fatal errors vs fatal crashes: The differences explained

Non-fatal errors happen in every application that's developed and have a close relationship with fatal errors. Most of us know ...
/ Optimization

Composition vs. Inheritance: code architecture solutions explained in Swift

Composition and inheritance are both fundamental programming techniques when working in object-oriented programming languages. You've likely been using both patterns ...
/ Swift

Property Wrappers in Swift explained with code examples

Property Wrappers in Swift allow you to extract common logic in a distinct wrapper object. This new technique appeared at ...
/ Swift

Async await in Swift explained with code examples

Async await is part of the new structured concurrency changes that arrived in Swift 5.5 during WWDC 2021. Concurrency in ...
/ ConcurrencySwift

Increasing development effectiveness by recognizing repetition

Development effectiveness determines how fast and efficient you can work as an engineer. The more efficient you can make your ...
/ Optimization

Presentation tips for performing professional Swift talks

Presentation tips can help you perform professional Swift talks by making sure you're well prepared and professional-looking. Last week, I ...
/ Optimization

Nonisolated and isolated keywords: Understanding Actor isolation

SE-313 introduced the nonisolated and isolated keywords as part of adding actor isolation control. Actors are a new way of ...
/ ConcurrencySwift

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 ...
/ Swift

Race condition vs. Data Race: the differences explained

Race conditions and data races are similar but have a few significant differences you should know. Both terms are often ...
/ 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 ...
/ SwiftXcode

PassthroughSubject vs. CurrentValueSubject explained

PassthroughSubject and CurrentValueSubject are two types from the Combine framework that conforms to the Subject protocol. Both are very similar ...
/ Combine

@AppStorage explained and replicated for a better alternative

The @AppStorage Property Wrapper was introduced in SwiftUI to allow easy access to the user defaults. When property wrappers were ...
/ Swift

How to use throwing properties to catch failures in Swift

Throwing properties allow defining computed properties that throw an error on failure. SE-310 introduced this feature in Swift 5.5 and ...
/ Swift

Unwrap or throw: Exploring solutions in Swift

Unwrap or throw is a scenario in which we want to throw an error if an optional returns a nil ...
/ Swift

Async let explained: call async functions in parallel

Async let is part of Swift's concurrency framework and allows instantiating a constant asynchronously. The concurrency framework introduced the concept ...
/ ConcurrencySwift

Development Assets in Xcode to enrich SwiftUI Previews

Development Assets in Xcode allow you to provide test data to use within SwiftUI previews and other code during development ...
/ Xcode

Dependency Injection in Swift using latest Swift features

Dependency Injection is a software design pattern in which an object receives other instances that it depends on. It's a ...
/ Swift

Actors in Swift: how to use and prevent data races

Swift Actors are new in Swift 5.5 and are part of the big concurrency changes at WWDC 2021. Before actors, ...
/ ConcurrencySwift

Flaky tests resolving using Test Repetitions in Xcode

Flaky tests can be frustrating to deal with. You're ready to open your PR until you realize your tests fail ...
/ Debugging

Improve discoverability using Static Member Lookup in Generic Contexts

Static Member Lookup is extended to Generic Contexts since the release of SE-0299. It might seem to be a minor ...
/ Swift

Presenting sheets with UIKit using a UISheetPresentationController

WWDC 2021 introduced iOS 15 with many API changes, including improvements to presenting sheets in UIKit with the new UISheetPresentationController ...
/ Swift

WWDC 2021 Events, Parties, and Panels you don’t want to miss

WWDC 2021 is around the corner and will bring a ton of (home)work for all of us. A new Xcode, ...
/ WWDC

Swift Jobs: How to make the right career move

Swift jobs are something we're all interested in. Companies are hiring remotely more than ever since everybody is working from ...
/ Swift

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, ...
/ Swift

URLSession: Common pitfalls with background download & upload tasks

URLSession enables you to download and upload files while the app is in the background. Basic instructions to get it ...
/ Swift

NSPredicate based XCTestExpectations for conditional checks

NSPredicate allows us to write predicates for validating a certain outcome. They're often used combined with Core Data fetch requests ...
/ Swift

How to observe NSManagedObject changes in Core Data using Combine

Observing changes in Core Data NSManagedObject instances with Combine publishers can be a great solution to keep your user interface ...
/ CombineCore Data

How to create a Conditional View Modifier in SwiftUI

Conditional View Modifier creation in SwiftUI allows you only to apply modifiers if a certain condition is true. Whether it's ...
/ SwiftUI

Getting started with the Combine framework in Swift

Combine was introduced as a new framework by Apple at WWDC 2019. The framework provides a declarative Swift API for ...
/ CombineSwift

How to test optionals in Swift with XCTest

Optionals types in Swift either have a value or not, and there are several ways to test optionals using the ...
/ Swift

How to use the rethrows keyword in Swift

Rethrows in Swift allows forwarding a thrown error by a given function parameter. It's used a lot in methods like ...
/ Swift

How to use @autoclosure in Swift to improve performance

@autoclosure in Swift is a type of closure that allows to omit braces and make it look like a normal ...
/ Swift

How to create a Dynamic Pager View for onboardings

A pager view in SwiftUI like we know UIPageViewController in UIKit didn't exist until iOS 14 and macOS 11.0. Using ...
/ SwiftUI

How and when to use Lazy Collections in Swift

Lazy collections are similar to a regular collection but change the way how modifiers like map, filter, and reduce are ...
/ Swift

How to use Variadic parameters in Swift

Variadic parameters make it possible to pass zero or more values of a specific type into a function. It can ...
/ Swift

XCTExpectFailure: Expected test failures explained with code examples

XCTExpectFailure was introduced in Xcode 12.5 and allows marking test failures as expected. The first time I read about this ...
/ Swift

Lazy var in Swift explained with code examples

A lazy var is a property whose initial value is not calculated until the first time it's called. It's part ...
/ Swift

Closures in Swift explained with Code Examples

Closures in Swift can be challenging to understand with types like trailing closures, capturing lists, and shorthand syntaxes. They're used ...
/ Swift

What is a Computed Property in Swift?

Computed properties are part of a family of property types in Swift. Stored properties are the most common which save ...
/ Swift

SwiftLee 2020 In Review: Most read blog posts

Every year I'm looking back at what I achieved with SwiftLee as well as what I want to achieve in ...
/ Swift

Getting started with associated types in Swift Protocols

Associated types in Swift work closely together with protocols. You can literally see them as an associated type of a ...
/ Swift

Result in Swift: Getting started with Code Examples

The Result enum is available since Swift 5 and allows us to define a success and failure case. The type ...
/ Swift

Xcode Mark Line to improve readability using // Mark: comments

Xcode Mark Lines allows us to create a better overview of sections within our classes or structs. A so-called mark ...
/ Xcode

App Launch Time: 7 tips to increase performance

App Launch Time is the time it takes before your app becomes responsive after startup. As the first experience of ...
/ Optimization

Data validation on insertion, update, and deletion in Core Data

Data validation in apps is important to make sure we save data conforming to the business rules. A name should ...
/ Core Data

Derived Attributes to improve Core Data Fetch Performance

Derived attributes are available since iOS 13 and aim to improve fetch performance in many different scenarios. Although we have ...
/ Core Data

Constraints in Core Data Entities explained

Constraints in Core Data are part of an entity configuration. Settings like the entity name and Spotlight display name might ...
/ Core DataSwift

NSManagedObject events: handling state in Core Data

An NSManagedObject lifecycle goes from insertion and updates until deletion in the end. All those events come with their own ...
/ Core DataSwift

Try Catch Throw: Error Handling in Swift with Code Examples

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

Overriding UserDefaults for improved productivity

UserDefaults within apps are used to store data related to user configurations. It's an easily accessible data store for saving ...
/ Xcode

How-to use Diffable Data Sources with Core Data

Diffable Data Sources were introduced at WWDC 2019 as a replacement for UICollectionViewDataSource and UITableViewDataSource. The API is available on ...
/ Core DataSwift

Diffable Data Sources Adoption with Ease

Diffable Data Sources were introduced at WWDC 2019 and are available since iOS 13. They're a replacement of the good ...
/ Swift

Persistent History Tracking in Core Data

WWDC 2017 introduced a new concept available from iOS 11 which is persistent history tracking. It's Apple's answer for merging ...
/ Core DataSwift

withAnimation completion callback with animatable modifiers

SwiftUI is great when it comes down to animations as it does a lot for you with methods like withAnimation ...
/ SwiftUI

Write-Ahead Logging (WAL) disabled to force commits in Core Data

Write-Ahead Logging is the default journaling mode for Core Data SQLite stores since iOS 7 and OS X Mavericks. Journaling ...
/ Core DataSwift

How to combine text weights in SwiftUI

Combining multiple text weights in SwiftUI might not look straight forward at first. If you're used to using UIKit you ...
/ SwiftUI

Adding a closure as a target to UIButton and other controls in Swift

The target-action pattern is used in combination with user interface controls as a callback to a user event. Whenever a ...
/ Swift

Launch screens in Xcode: All the options explained

Launch screens appear when your app starts up and give the user the impression that your app is fast and ...
/ Xcode

ValueTransformer in Core Data explained: Storing absolute URLs

ValueTransformers in Core Data are a powerful way of transforming values before they get inserted into the database and before ...
/ Core DataSwift

Full-screen development with Xcode and the Simulator

While developing apps it's important to create focus to get in your flow and speed up development. Full-screen mode can ...
/ Workflow

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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ Core DataSwift

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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ DebuggingSwift

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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ Core DataSwift

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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ Swift

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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ Swift

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, ...
/ 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 ...
/ 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 ...
/ Core DataSwift

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 ...
/ 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 ...
/ 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 ...
/ 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, ...
/ Swift

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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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, ...
/ 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 ...
/ 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 ...
/ CombineSwift

Using Xcode Previews with existing UIKit views without using SwiftUI

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

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 ...
/ 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 ...
/ Core DataSwift

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) ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ Xcode

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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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, ...
/ 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 ...
/ 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 ...
/ 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 ...
/ GeneralSwift

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 ...
/ 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 ...
/ OptimizationXcode

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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ DebuggingOptimization

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 ...
/ Core DataDebugging

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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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 ...
/ 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, ...
/ 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 ...
/ Workflow

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 ...
/ 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 ...
/ 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: ...
/ 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 ...
/ 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 ...
/ Swift