In this post, I’ll discuss why I have decided to stop supporting UIKit-based keyboards in KeyboardKit 4.0.
In this post, I’ll provide a solution to the dreaded
the server ssh fingerprint failed to verify error that may bite you when you add an SPM dependency to an app from a private server over SSH, using an IP address and port.
In this post, I’ll demonstrate how to use MockingKit to mock protocols and classes. We can then use this technique in unit tests and to fake not yet implemented logic.
In this post, I’ll discuss how I built a movie-streaming app for iOS and iPadOS in SwiftUI, for the Swedish video streaming service Cineasterna.
In this post, I’ll discuss how I built a movie-streaming app for tvOS in SwiftUI, for the Swedish public library video streaming service Cineasterna.
In this post, we’ll look at an easier way to manage full screen covers in SwiftUI, that lets us reuse functionality, reduce state management and present many covers in the same way.
In this post, we’ll look at a way to validate app localizations and integrate it into Fastlane and any CI processes you may have.
In this post, we’ll look at various ways to improve readability and writeability of Swift code by introducing extensions to Swift’s native types.
In this post, we’ll look at an easier way to manage alerts in SwiftUI, that lets us reuse functionality, reduce state management and present many different alerts in the same way.
In this post, we’ll look at an easier way to manage sheets in SwiftUI, that lets us reuse functionality, reduce state management and present many different sheets in the same way.
In this post, we’ll look at how to uniquely identify the current device. We’ll look at different way of persisting the unique identifier to make it available even if the app is uninstalled.
In this post, we’ll look at how to read from and write to the keychain on iOS devices. We’ll look at a great library for this and how we can make it more abstract.
In this post, we’ll discuss how to url encode strings. We’ll then create an extension that let’s us do this easier and with less code.
In this post, we’ll discuss how to replace all occurences of a string within another string. We’ll then create an extension that allows for easier case-sensitive replacements.
In this post, we’ll discuss how to check if a String contain another String. We’ll then create an extension that allows for easier case-insensitive checks.
In this post, we’ll discuss how to Base64 encode and decode strings in Swift. We’ll then create extensions that make this a lot easier and more readable.
In this post, we’ll create string representations of numeric types in Swift and extend these types with convenience functionality to make them easier to use.
In this post, we’ll extend Result with extensions that make using it easier in certain situations.
In this post, we’ll look at how
DispatchQueue can be used to delay and chain operations. We’ll also extend it with more convenient functions that simplify these tasks.
In this post, we’ll extend Date with functions that let us compare dates with clean, readable code.
In this post, we’ll extend Date with functions that let us add and remove seconds, minutes, hours and days to dates.
In this post, we’ll look at the basics of Inversion of Control (IoC) and Dependency Injection and how to reduce coupling within your codebase.
In this post, we’ll look at how to perform local biometric authentication with FaceID or TouchID on Apple’s various platforms, using the
SwiftUI is an amazing tool for building declarative user interfaces. However, it’s still young and lacks built-in ways to do many common things. In this post, we’ll look at a way to read geometry information from any view in a view hierarchy.
SwiftUI and Combine makes it amazingly easy to build apps for watchOS. However, if the app is part of a larger system, you may have to adjust your architecture. In this post, we’ll take a look at the work involved in building BookBeat’s SwiftUI/Combine-based app for Apple Watch.
Presenting UIKit view controllers in SwiftUI is trivial, but things become more complicated when a controller communicates back through delegation. Since SwiftUI views are structs, they therefore can’t be delegates. In this post, we’ll look at one way to solve this.
In this post, we’ll create a package for the Swift Package Manager. The result will be a package that adds more gestures to SwiftUI. You can find the finished package here.
When you create Swift Packages with
swift package init, the generated .gitignore will exclude all Xcode projects by default. This will cause problems if you later add an Xcode project to your package.
If you use
swift package generate-xcodeproj to generate an Xcode project for a SPM package, App Store will reject any apps that adds this library with Carthage. This post will show you how to make App Store submission work.
In this post, I’ll show how to restore the network configuration in macOS Catalina beta 5, if it suddenly stops working. It happened to me and the solution was to just delete a couple of files.
For years, I’ve been struggling with combining generics and protocols in Swift. In this post, I’ll describe how I finally made sense of it all.
I really love the Swift type system and its extension model. You have to use it with care, but combined with careful system design, they give you a lot of power. In this short post, I discuss how to keep your extensions from being exposed everywhere.
This is a short note to self about how to use
git instead of
grep to recursively find all occurrences of a certain text in all files within a root folder.
struct are two powerful tools. In this post, I’ll discuss how you typically use them and how to use structs like enums when you need more flexibility.
Swift is an amazing language, but I find that it lacks good support for coordinating async operations in sophisticated ways. In this post, I will look at existing libraries for solving this problem, then discuss a lightweight alternative that uses a couple of simple protocols and implementations.
Sheeeeeeeeet 1.2 introduces a completely rewritten appearance engine that makes it easier to style and subclass your action sheets and their items. In this post, I’ll discuss some of the major changes.
In this post, I’ll write about my process to find a setup that lets me be more productive and flexible in how I work with my various sites, projects, blog etc. I will descibe how I moved away from my old hosting provider and Wordpress and how I finally found a setup that lets me create content on my iPad Pro.
This is an updated version of a talk I gave at CocoaHeads Sthlm in 2017 on how to use Alamofire to communcate with an api, AlamofireObjectMapper to map responses, the Alamofire
RequestRetrier to automatically retry failing requests and the
RequestAdapter to adapt all requests. I also demonstrated how to use Realm to seamlessly add offline support, using the decorator pattern.
In this post, I will show how to reduce the amount of code you have to type when
testing enums, by using the new
In this blog post, I will show how to automate setting up Xcode for you and your
team, including setting up required tools, simplify enforcing common conventions
Fastlane in a way that is easy to extend if you need
to automate more tasks later on.
After installing Xcode 10 yesterday, I started migrating some libraries to Swift
4.2. While most migrations were painless, one caused me some headache, since the
library depends on
SwiftyDropbox which does not yet support Swift 4.2.
In this post, I’ll describe how you can automate setting up a brand new Mac with a terminal script that will install system software, applications, configure the computer etc. This will help you setup a new Mac in minutes.
After putting years into iOS and Swift development, I have come to a point where I am pretty happy with my project structure, code conventions, coding habits etc.
This year, I decided not to wait a while year before installing the latest macOS, so I grabbed it as a beta, installed it and didn’t look back. Before doing so, I also created a setup script that quickly can setup a clean computer from scratch. I am not that brave.
I have finally started replacing all
NSCoding objects in my code with
This post covers things that I’ve learned along the way.
In an app of mine, I had an idea on how to redesign how we extend protocol-based domain models. However, what first looked like a walk in the park, turned into a Swift nightmare, with problems that I am still struggling with.
In my previous post, I wrote about how I do not like iOS delegates and target/selectors and how I prefer to use closures.
After hearing so many good things about RxSwift and not having the opportunity to try it at work, I decided to use it when I rewrote an old app of mine.
Tonight, I finally sat down with my oldest daughter Cornelia, to play with Swift Playgrounds and try to teach her a bit about programming.
In this post, I will write about my experience using Working Copy on my iPad Pro, adding a blog post to a Jekyll-powered blog, then pushing the result to GitHub.
This post will show you how to apply the
UITextField placeholder behavior to a
UITextView, which natively lacks this support.
This is a summary of my talk at CocoaHeads Sthlm, April 3 2017, where I talked about using Alamofire, AlamofireObjectMapper and Realm to talk to an api, map its responses, automatically retry and adapt requests and how to use Realm to create implicit offline support.
I am really looking forward to a HoloLens event at tretton17 next week, where Jimmy Engström will demonstrate this awesome piece of technology:
After procrastinating for too long, I finally spent a minute of my life to setup git autocomplete in the macOS terminal. The original discussion on this topic is found here.
I finally made it! After years and years of “I really shouldn’t”, I have finally managed to abandon my old hosting provider and move all my sites to GitHub.
In a project that I’m currently working on, I load images asynchronously into an UIImageView. As the download starts, I apply a placeholder image from the bundle to the image view, to indicate that no image has yet been downloaded.
Today, I managed to click the “Skip Bundles” button instead of the “Load Bundles” button, when I started up Xcode after adding two new plugins.
I have been playing around with .NET Core since the early betas, but since I do so with rather long times in between, things break each time I decide to pick up from where I started.
In an Ionic 2 app that I am building for iOS and Android, I want to use different application settings for different build configurations. For instance, I want to use different api endpoints for development and production apps, disable tracking for development apps, disable logging for production apps etc.
With the release of Visual Studio Code 1.0, I decided to upgrade .NET Core to the latest version. However, the older version was not properly replaced when upgrading, which did cause Visual Studio Code and Omnisharp to behave quite strange.