Blog
Creating a SwiftUI text view with tappable links
In this post, we’ll take a look at how to create a SwiftUI Text
alternative that can mix plain text and tappable links, using the Text
view’s underlying support for Markdown.
Xcode stops fetching Swift packages
Today, Xcode 16.1 suddenly stopped fetching Swift package dependencies, with a Fatal: cannot use bare repository
warning. Let’s see how to fix it, in case it starts happening to you.
Replacing Fastlane with Shell scripts
After many, many years of great service, I’m looking to replace Fastlane with plain Shell script files, which I hope will result in faster builds and…less Ruby.
New GestureButton open-source project
The GestureButton component that used to be part of the SwiftUIKit has now been moved to a new, separate open-source project called GestureButton.
The (too?) complex state of Emojis in 2024
Let’s take a look at the Emoji standard’s support for skin tone, gender, and direction variants, and how it may have reached its peak as Apple for the first time has removed emojis in iOS 17.4.
An easier way to use standard buttons types in SwiftUI
In this post, I’ll show how to use a simple enum to make it easier to reuse standard button types (add, delete, edit, done, etc.), with support for localization.
Creating custom environment values in SwiftUI
In this post, I’ll describe how to create custom environment values in SwiftUI, and how I’ve abused Swift to let us do it with a lot less code than what is otherwise required.
Creating a custom label style that tints the label icon
In this post, we’ll take a look at how to create a SwiftUI LabelStyle
that only tints the label icon, while leaving the text element unchanged.
Setting up a custom Swift Package file header
In this post, we’ll take a look at how to set up a custom Swift Package file header, which is then used for all new Swift files that we create in that package.
Linking to native type extensions in DocC
In this post, we’ll take a look at how we can use Xcode 15’s improved DocC capabilities to link to native type extensions, to provide even better documentation to our users.
Publish DocC to GitHub Pages with GitHub Actions
In this post, we’ll see how we can use GitHub Actions to automatically build and publish a Swift Package’s DocC docs to GitHub Pages, every time we push to a specific branch.
The power of inout parameters in Swift
In Swift, inout
parameters can reduce code duplication and the amount of code needed to perform certain tasks. Let’s take a look at some examples.
Custom Keyboard Extensions disappear in iOS 17.2 and later
Some KeyboardKit users have reported that their keyboard extensions have disappeared in iOS 17.2. This article discusses some concerns after investigating the problem.
EmojiKit goes open-source
I’ve decided to open-source the EmojiKit SDK and move it from my company Kankoda to my own GitHub account. In this post, I’ll discuss why and how it will be done.
Using ApiKit to integrate with a REST API
In this post, we’ll take a look at how easy it is to use the open-source Swift package ApiKit to integrate with a REST-based API and map its data to local models.
Sunsetting the Goth & Metal Emoji Apps
After keeping the Goth & Metal Emoji apps alive for 8 years, I’m sunsetting them together with some other apps, to allow me to focus on fewer things.
Sunsetting my deck-based apps
After keeping the Pickup Deck, Prank Deck & Quote Deck apps alive for 12 years, I’m now sunsetting them to let me focus on fewer things.
Unleashing Creativity in Coding - How Adobe Express Empowers Programmers
In this guest article from Adobe, we explore the various ways in which coders can leverage Adobe Express to elevate their work and workflow.
Rejected - An Apple Developer Holiday Special
This is a Christmas story on the many frustrations of being a developer in the Apple ecosystem. But this time they may be correct. Happy holidays everyone!
Implementing Quick Search with SwiftUI Searchable
In this post, we’ll take a look at how to search with the .searchable
API, by just typing on the keyboard without first having to tap/click on the text field.
Customizing the macOS About Panel in SwiftUI
In this post, we’ll take a look at how we can customize the macOS About Panel in SwiftUI, using project settings, bundle files, and SwiftUI.
Customizing the macOS menu bar in SwiftUI
In this post, we’ll take a look at how to customize the macOS menu bar for a SwiftUI app, using SwiftUI tools like CommandMenu
and CommandGroup
.
Reflections on failing to reach out
My last month has been all about wrapping up and releasing a brand new major version of KeyboardKit. It has been a fun project…but failed to deliver on all the work that went into it.
Dismissing a multiline textfield with the return key in SwiftUI
While a single-line TextField
will dismiss the keyboard when you press return, the same is not true for a multiline text field. Lets take a look at how to fix this.
Enabling drag reordering in lazy SwiftUI grids and stacks
While the SwiftUI List
supports drag to reordering, LazyVGrid
, LazyHGrid
, LazyVStack
& LazyHStack
lack this functionality. Let’s implement this functionality from scratch.
Cleaner grid initialization in SwiftUI
SwiftUI’s LazyVGrid
and LazyHGrid
are great for creating flexible grids. I however always find myself struggling with their initialization and have therefore created some utilities.
SwiftUI Menu gets incorrect list separator lines
If you’ved added a SwiftUI Menu
with an icon Label
to a List
, you may have noticed that the separator line behaves unlike other items, and starts below the icon instead of the title.
Storing Codable types in SwiftUI AppStorage
SwiftUI keeps evolving, but there are still some missing things. Today, let’s see how we can extend Codable
to make it possible to persist it in AppStorage
and SceneStorage
.
SwiftUI Prefers Semantics
SwiftUI get amazing updates every year. If you however have to support old OS versions, you may be unable to use the new tools, or jump through hoops to make it work.
DeckKit Updates
DeckKit 0.7 is out, with new shuffle support that makes shuffling a deck enjoyable. Let’s take a look at what’s new in this minor update.
SwiftUIKit Updates
SwiftUIKit 3.3 is out with some additions, like support for using Codable
with AppStorage
and SceneStorage
, as well as new list utils. Let’s take a look at what’s new in this update.
Vision Pro - so many questions
Apple Vision Pro is finally unveiled! As a surprise to no one, it looks spectacular. However, for every rumor and question addressed today, new ones arised.
RichTextKit updates
After a long time away from the project, I finally had some time to revisit RichTextKit and add some new features, like indentation support and grouped controls.
Creating a bordered button group in SwiftUI
Just like how SwiftUI buttons can use a .bordered
button style, you can use ControlGroup
to group several buttons together in a bordered group.
Extending the SwiftUI DocumentGroup with more features
DocumentGroup
-based apps make it easy to edit documents and store them on device and in the cloud. However, they are limited when it comes to customization. Let’s extend them!
An App Group roller coaster ride
I’ve been struggling with a random bug when using an App Group to sync data between an app and a keyboard extension. The explanation: a combination of human error and Xcode.
Deep Dish Swift - Day 3
Deep Dish Swift flew by and suddenly, the third and final day was here…way to soon. I’m impressed by the scale of this first edition, and hope there will be a second one next year.
Deep Dish Swift - Day 2
Deep Dish Swift Day 1 was one afternoon filled with amazing talks and getting the chance to meet many people from the community. Let’s get Day 2 going.
Deep Dish Swift - Day 1
2023 flew by and Deep Dish Swift suddenly happened! This is a summary of the first indie dev day. The talks are not recorded, so invite the speakers to your conference.
Group and sort collections in Swift like a pro
Swift provides powerful ways to group and sort collections. Let’s take a look at some ways to do this and how to change the sort logic a bit.
Sort git tags like a pro
If you like me use semantic versioning and have projects with a gazillion version tags, it’s nice to be able sort the tags in various ways. Let’s see how to sort Git tags like a pro.
Handling status bar color scheme and visibility in SwiftUI
As we’ve previously looked at how to implement offset tracking and stretchable and sticky headers for SwiftUI scroll views, let’s look at how to handle status bar tint and visibility.
Adding a stretchable & sticky header to a SwiftUI ScrollView
As we’ve previously looked at how to implement offset tracking and stretchable headers for SwiftUI scroll views, let’s combine them to implement a stretchy, sticky scroll view header.
Adding scroll offset tracking to a SwiftUI ScrollView
The SwiftUI ScrollView
is currently quite limited in functionality, and will for instance not let us detect the current scroll offset. Let’s take s look at how to add offset tracking to it.
Adding a stretchable header to a SwiftUI ScrollView
Many iOS apps have screens where the header view stretches out when you pull down the screen. In this post, let’s look at how to implement such a header view in SwiftUI.
Mimicking the iOS system notification in SwiftUI
In this post, I’ll show how you can use the SystemNotificaton open-source library to mimic iOS system notifications in your SwiftUI apps.
Removing extra back button in DocumentGroup navigation bar
If you are building DocumentGroup
-based apps in SwiftUI, you may have noticed that apps that worked fine in Xcode 15 now show two back buttons when being built with Xcode 16.
Applying complex gestures to a SwiftUI view
As we saw in last week’s post, gestures in a ScrollView
are complicated, since they can block the scrolling. Without a scroll view, things become a lot easier. Let’s take a look.
Using complex gestures in a SwiftUI ScrollView
SwiftUI gestures are complicated, since they can block the ScrollView
gestures. Let’s look at a way to implement rich view gestures in a way that doesn’t block the scrolling.
Introducing LicenseKit
When building closed-source software, you must protect your source code as well as the binaries themselves. One way to do this is with software licenses. This is why I’m excited to introduce LicenseKit - an SDK that protects your software with commercial licenses.
Rewriting Wally for iOS 16 and SwiftUI 4
I’m about to release a brand new version of Wally, which was the first app I ever made for iOS 10+ years ago. Wally 4 has been rewritten for iOS 16, using SwiftUI 4.
AI-based image generation with DALL·E, Stable Diffusion and Promptbase
I’m a bit late to the AI party, but just wanted to write down some thoughts about DALL·E 2, Stable Diffusion and the ecosystems of services that follow, like PromptBase.
Using slugified and style-based tags in SwiftUI
As I’m rewriting an old app from scratch, I’m adding content tagging to it. For reusability, I’ve put all tag-specific logic in a new library called TagKit. Let’s take a look!
Getting started with the SwiftUI NavigationSplitView
SwiftUI 4 adds a new NavigationSplitView
component that simplifies creating rich sidebar-based experiences on iPad and macOS, while scaling it down on iPhone. Let’s take a look!
Conditionally searchable SwiftUI views
SwiftUI 3 adds a searchable
view modifier that makes it possible to add a search field to any view. In this post, let’s take a look at how to make it (and other modifiers) conditional.
Removing the iOS home indicator in SwiftUI
In SwiftUI 4 & iOS 16, you will finally be able to hide the home indicator on iPhone & iPad devices that don’t have a home button, without resorting to UIKit-based hacks.
Multi-platform image resizing
In this post, let’s take a look at how to resize images in UIKit & AppKit. The result will work on iOS, macOS, tvOS & watchOS and lets us use the the same APIs on all platforms.
Using QuickLook in SwiftUI
SwiftUI is growing with every release, but there are still old treasures to be found in various frameworks, that aren’t part of core SwiftUI. Let’s take a quick look at QuickLook
!
Introducing StoreKitPlus
In this post, let’s take a look at StoreKitPlus, which adds extra functionality for working with StoreKit 2 to make it easier to use StoreKit in SwiftUI.
Backporting the SwiftUI 4 ImageRenderer to iOS 13
SwiftUI 4 introduces a new ImageRenderer
that can render any SwiftUI view as an image in iOS 16, macOS 13, tvOS 16 & watchOS 9. Let’s look at how to backport it to iOS 13.
Undimmed presentation detents in SwiftUI
SwiftUI 4 adds a bunch of great features, such as custom sized sheets. However, sheets will always dim the underlying view, even in smaller sizes. Let’s fix that.
Using the SwiftUI 4 ImageRenderer
SwiftUI 4 introduces a new ImageRenderer
that can be used to render any SwiftUI view as an image in iOS 16, macOS 13, tvOS 16 & watchOS 9. Let’s take a look at how it works.
SF Symbols 4 variable colors
SF Symbols is an amazing icon library, designed to integrate seamlessly with the various Apple platforms. SF Symbols 4 adds even more things. Let’s take a look at variable colors!
Custom sheet sizes in SwiftUI
WWDC’22 introduced many amazing additions to SwiftUI, of which many will render many 3rd party libraries obsolete. One such is SwiftUI’s new support for custom sheet sizes.
Building a rich text editor for UIKit, AppKit and SwiftUI
In this article, we’ll look at how to extend the rich text support in UIKit, AppKit & SwiftUI by extending native types, adding new types to bridge the different platforms, etc.
SwiftUI scrolling finally works in tvOS 16
To all of you who have struggled with SwiftUI and slow scrolling on tvOS - happy news! With Xcode 14 and SwiftUI 4, scrolling finally seems to work in tvOS 16.
A better way to extend types
In this post, let’s take a look at a better way to extend types in Swift, to make extensions more versatile and discoverable.
Getting images from the AppKit pasteboard
In this post, we’ll take a look at how to fetch images from the AppKit NSPasteboard
, which behaves a bit differently than the UIKit UIPasteboard
.
Making Swift package assets work in SwiftUI previews
In this post, we’ll take a look at how we can get colors, images and other assets that are defined in Swift packages to work in external SwiftUI previews.
Slugify a string
In this post, we’ll take a quick look at how to slugify a string in Swift, which is nice if you want to generate tags, web urls etc.
Detecting SwiftUI's preview mode
In this article, we’ll take a look at how to determine if code is running in a SwiftUI preview, which may be nice if you need to disable certain things, like network calls.
Generating a random color in SwiftUI
In this post, we’ll take a look at how to generate a random color in SwiftUI, using the nice random APIs that are now included in Swift.
Creating a custom environment key for safe area insets
In this post, we’ll take a look at how to create a custom SwiftUI environment key that lets us get the safe area insets for the current scene.
Using the isEnabled environment value in iOS 14
SwiftUI is great, but has a history of buggy behavior. Even if you follow the documentation and your code compiles, you must still verify that it works, especially on older OS versions.
How to fix 'linking against a dylib which is not safe for use in application extensions' warning
Swift packages is a powerful tool for separating your code into modules. However, Xcode currently shows a linking against a dylib which is not safe for use in application extensions
warning when linking packages in certain ways, even when a package is safe.
Presenting SwiftUI views from DocumentGroup
The SwiftUI DocumentGroup
makes it easy to create document-based apps. However, it is a bit limited, with some basic things being hard to do. In this post, let’s take a look at how we can present custom views as modals from a DocumentGroup
.
Creating a property wrapper to persist Codable types
In this post, we’ll create a property wrapper that can be used with Codable
to automatically persists it in UserDefaults
and update SwiftUI when its value changes.
Schedule GitHub Pages rebuild with GitHub Actions
In this post, let’s take a look at how to schedule a website with GitHub Actions, so that we can create future content that is automatically published at the intended publish date.
Building a document scanner in SwiftUI
In this post, let’s take a look at how to we can extend SwiftUI with a document scanner that uses the device camera to scan documents in iOS.
Creating hex-based colors in UIKit, AppKit and SwiftUI
In this post, let’s take a quick look at how to we can extend UIKit, AppKit & SwiftUI colors with hex-based initializers that accept strings ("#abcdef"
) and numeric values (0xabcdef
).
A flexible way to handle async errors in SwiftUI
In this post, let’s take a look at how to handle async errors in a flexible and scalable way in SwiftUI. We’ll cover both completion block- and async/await-based use cases.
Linking DocC to package named types
In this post, let’s take a look at how to link DocC to types that have the same name as the target they belong to.
Extending local authentication with async support
In this post, let’s take a look at how to extend the LocalAuthentication
framework with an async
way to perform local authentication.
Building multi-platform documentation with DocC
DocC is an amazing documentation tool for Swift-based projects. This post shows how to generate multi-platform documentation with DocC, using Terminal scripts and Fastlane.
How to bridge platform-specific types in Swift & SwiftUI
SwiftUI’s multi-platform support makes it easy to develop apps for all platforms, but how do you handle types that differ between platforms? Let’s take a look.
Building a WebView for iOS and macOS in SwiftUI
Since SwiftUI currently has no WebView, we have to create one ourselves. Let’s see how easy it is to build a multi-platform web view for iOS, iPadOS & macOS.
M1 Swift Package and XCFramework Problems
I love my 14” M1 MacBook Pro, but have some architectural problems when working with Swift Packages and XCFramework builds. Let’s look at some problems…and solutions.
Going open-source
In this post, I’ll discuss my experiences of working on various open-source projects, some of the steps and processes involved as well as some learnings.
Building the KeyboardKit app
In this post, I’ll discuss my new KeyboardKit app for iOS & iPadOS. I’ll go through my first vision, the actual outcome, as well as a bunch of findings, problems etc.
Git tags cheat sheet
In this post, let’s look at some git commands that I find useful. The post is primarily meant for future reference for myself, but can hopefully be useful to others as well.
Distributing closed-source frameworks with SPM
In this post, we’ll look at how to distribute closed-source products with the Swift Package Manager (SPM). We’ll go through project setup, package distribution and some problems.
Mocking with MockingKit
In this post, I’ll demonstrate how to use MockingKit to mock protocols and classes, that let you record and inspect function calls in your unit tests, register conditional returns, etc.
Making Xcode and SPM trust a private SSH server
In this post, let’s take a look at the server ssh fingerprint failed to verify
error, which may bite you if you add an SPM dependency from a private server, using SSH.
Building a video streaming app for iOS in SwiftUI
This is a follow-up to this post, where I discussed building a video streaming app for tvOS, using SwiftUI. This post will discuss how I ported the app to iOS.
Building a video streaming app for tvOS in SwiftUI
In this post, let’s see how I created a tvOS app in SwiftUI for the Swedish video streaming service Cineasterna, which lets people watch movies for free with their public library card.
An easier way to manage full screen covers in SwiftUI
In this post, we’ll look at an easier way to manage full screen covers in SwiftUI, in a way that reduces state management and lets us present many covers with the same modifier.
Validate Localized Resources
In this post, we’ll look at a way to validate app localizations and integrate it into Fastlane and any CI tools and processes that you may have in place.
Swift Semantics
In this post, we’ll look at various ways to improve readability of Swift code, by introducing a couple of extensions to Swift’s native types.
An easier way to manage alerts in SwiftUI
In this post, we’ll look at an easier way to manage alerts in SwiftUI, in a way that reduces state management and lets us present many alerts with the same modifier.
An easier way to manage sheets in SwiftUI
In this post, we’ll look at an easier way to manage sheets in SwiftUI, in a way that reduces state management and lets us present many sheets with the same modifier.
Uniquely identify the current device
In this post, we’ll look at how to uniquely identify the current device, and different ways of persisting the unique identifier to make it available even if the app is uninstalled.
Using the keychain to persist data in Swift
In this post, we’ll look at how to read from and write to the keychain on Apple devices. We’ll look at a great library for this and how we can make it more abstract.
URL-encoding strings in Swift
In this post, we’ll look at how to url encode strings. We’ll then create an extension that let’s us do this easier and with less code.
Case-sensitive string replacements in Swift
In this post, we’ll discuss how to replace all occurences of a string in another string and then create an extension that allows for easier case-sensitive replacements.
Case-sensitive String contains checks in Swift
In this post, we’ll look at how to check if a string contains another string. We’ll then create an extension that allows for easier case-insensitive checks.
Base64 encode and decode strings in Swift
In this post, we’ll discuss how to Base64 encode and decode strings in Swift. We’ll also create a couple of extensions to make this easier to use and more readable.
Numeric string representations in Swift
In this post, we’ll create string representations of numeric Swift types and extend them with convenience functionality to make them easier to use.
Extending the Swift Result type
In this post, we’ll extend the Swift native Result
type with extensions that make it easier to use it in certain situations.
Delay and chain Swift operations with DispatchQueue
In this post, we’ll look at how DispatchQueue
can be used to delay and chain operations. We’ll also extend it with convenient functions that simplify these tasks.
Comparing dates in Swift
In this post, we’ll look at how to compare dates in Swift. We’ll also extend Date
with more ways to compare dates with clean, readable code.
Modifying dates in Swift
In this post, we’ll look at how to modify dates in Swift. We’ll also extend Date
with ways to modify dates with clean, readable code.
IoC and Dependency Injection in Swift
In this post, we’ll look at the basics of Inversion of Control (IoC) and Dependency Injection and how to use it in a Swift codebase, to remove strong couplings.
Perform biometric authentication with FaceID or TouchID
In this post, we’ll look at how to use the LocalAuthentication
framework for biometric user authentication with FaceID or TouchID on Apple’s platforms.
Bind view geometry data to bindable properties
SwiftUI is a great UI framework. However, it’s still young and may lack things you need. In this post, we’ll look at a way to read geometry information from any view.
Building a multi-platform app in a protocol-driven way
SwiftUI and Combine makes it easy to build apps for watchOS. In this post, we’ll take a look at the work involved in building a watchOS app in SwiftUI.
View controller delegation in SwiftUI
Presenting UIKit view controllers in SwiftUI is simple, but things become more complicated when they communicate through delegation. In this post, we’ll look at a way to solve this.
Creating an SPM Package for SwiftUI
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.
SPM .gitignore excludes Xcode projects
When you create Swift Packages with swift package init
, the default .gitignore excludes Xcode projects. This will cause problems if you later add an Xcode project to the package.
App Store submission fails with Carthage and SPM
When you use swift package generate-xcodeproj
to generate an Xcode project for a Swift Package, App Store will reject any apps that adds this library with Carthage.
Generic Swift protocols
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.
Constrain Swift extensions with protocols
I love Swift’s type system and its extension model, but you have to use it with care. In this short post, I discuss how to keep your extensions from being exposed everywhere.
git grep
This is a short note to my future self on how to use git grep
instead of grep
to find all occurrences of a certain text in all files within a git repository folder.
Using structs like enums in Swift
Swift enum
and struct
are two powerful tools. In this post, I’ll discuss how you typically use them, and how you can use structs like enums when you need more flexibility.
Coordinating async operations in Swift
Swift is an amazing language, but it currently lacks good support for coordinating async operations in a sophisticated way. In this post, I will look at ways to solve this.
iPad Pro production setup
In this post, I’ll write about findung a more flexible setup for my various sites, projects, blog etc. I’ll descibe how I moved away from my old hosting provider and Wordpress and found a setup that lets me create content on my iPad Pro.
Alamofire + AlamofireObjectMapper
This is an updated version of a talk I gave at CocoaHeads Sthlm in 2017, on how to use Alamofire to talk with an api, AlamofireObjectMapper to map responses, the Alamofire RequestRetrier
to retry failing requests and the RequestAdapter
to adapt all requests.
Simplify enum testing with CaseIterative
In this post, I will show how to reduce the amount of code you have to type when testing enums, by using the new CaseIterable
protocol.
Automate setting up Xcode
In this post, I will show how to automate setting up Xcode using Homebrew
and Fastlane
in a way that is easy to extend if you need to automate more later on.
Automate setting up macOS
In this post, I’ll describe how to automate setting up a new Mac with a terminal script that will install system software and applications, configure the computer etc. in mere minutes.
Codable magic
I have finally started replacing NSCoding
types in my code with the new Codable
protocol. This article covers things that I’ve learned along the way.
Protocol-based array extensions not working
In a project I’m currently working on, I want to redesign how we use protocol-based domain models. However, what first looked easy turned into a Swift nightmare.
Closure-based gesture recognizers
In my previous post, I wrote about how I don’t like delegates and target/selectors and how I prefer closures. Let’s see how to use closures in gesture recognizers to make things nicer.
Ditching RxSwift
After hearing many good things about RxSwift, I decided to use it in an app. However, after struggling with it for months, I haven’t found a nice setup and have now decided to ditch it.
A Swift Playgrounds Evening
Tonight, I sat down with my oldest daughter, to play with Swift Playgrounds and to teach her a bit about programming in Swift.
Using iPad Pro with Working Copy
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.
Adding placeholder support to UITextView
This post shows how to apply the UITextField
placeholder behavior to a UITextView
, which natively lacks this support.
HoloLens, Microsoft, VR and Apple
I’m really looking forward to an event at tretton17 next week, where Jimmy Engström will demonstrate the awesome Microsoft Hololens.
Problems with Quick, Nimble and CocoaPods
When creating Swift libraries, I use Quick for tests and Nimble for test assertions. They are great tools that speed up writing tests, but don’t always play well with CocoaPods.
git autocompletion in OS X Terminal
After procrastinating for too long, I finally spent a minute to enable git autocomplete in the Terminal. The original discussion on this topic is found here.
New year, new habits
I finally made it! After years of “I really should”, I have finally left my old hosting provider, move all my sites to GitHub and start with some nice new habits for the new year.
UIImageView is pixelated after applying an async image
In an iOS project that I’m working on, I load images asynchronously into an UIImageView
. Although images are properly fetched, they’re pixelated when they’re added to the view.
Reset Xcode load plugin bundles warning
I accidentally clicked “Skip Bundles” instead of “Load Bundles” when I started Xcode after adding new plugins. This causes Xcode to not load plugins. How can we fix this?
Ionic 2 - Build Configuration-Specific Settings
In an Ionic 2 app that I’m building for iOS and Android, I want to use different application settings for different build configurations. Let’s see how this can be achieved in Ionic 2.
Update the title of an MKAnnotation
I’m building a map app where users can save pins and present them as custom pins, with custom icons and colors. I must therefore update how MKAnnotation
is shown on a map.
Xcode 6.3 - Code object is not signed at all
After upgrading to Xcode 6.3, I get an error saying ERROR ITMS-90035: "Invalid Signature. Code object is not signed at all"
. Let’s look at what this is and how to fix it.
Dependency injection and IoC in iOS and Swift
Inversion of Control and Dependency Injection are hot topics in .NET, but rare in the iOS community. They are however powerful tools, so let’s look at how to setup IoC in iOS.
Using Swift protocols in Objective-C
I’m currently creating two games for iOS. One is made in Swift & SpriteKit, while one is in Objective-C & UIKit. I now want to share logic by using my Swift protocols in Objective-C.
Using Crittercism for iOS crash reporting
In this post, let’s look at how to use Crittercism to let your iOS or Android users report bugs and provide you with automated crash reports.
Matthew McCollough - The third wave of artfulness in code
Oh, my GOD, Matthew McCollough from GitHub made my day with this amazing Øredev 2013 keynote, leaving me tumbled in the hotel lobby for a good while afterwards.
Denise Jacobs - The Creativity (R)Evolution
The creativity evangelist Denise Jacobs coaches people in the tech field through creativity. In her Øredev 2013 keynote, she talked about creativity, betterness and habits.
Siren Hofvander - Being Secure on a Mobile Platform
This great Øredev 2013 session focused on how to be secure on a mobile platform, with a bunch of great examples and concrete demos.
Shay Friedman - 30 NuGet packages in 50 minutes
This Øredev 2013 session was a masterpiece, where Shay Friedman blasted through 30 NuGet packages in 50 minutes.
David Planella - Ubuntu, A Powerful, New Force in Mobile
This Øredev 2013 session was all about the new Ubuntu Mobile platform, which I’m very excited over, despite not being a Linux or Ubuntu guy. It looks very promising.
Jimmy Nilsson & Jon Gyllensward - Less is more! When it comes to art and software
This talk was a case study from Sirius International Jon Gyllenswärd and Jimmy Nilsson from factor 10 talked about a two year long change process they managed together.
Woody Zuill - Mob Programming, A Whole Team Approach
This Øredev 2013 session focused on mob programming, where the team works together on implementing changes and new features.
Björn Granvik - Distributed Teams
This Øredev 2013 session was interesting and required a lot of attention, which made it a bit hard for me to sum it up properly. However, I will do my best.
Christian Horsdal - Layers Considered Harmful
In this Øredev 2013 session, Christian Horsdal talked about layers, careful to distinguish between layers (logical) and tiers (physical).
Scaling mobile at Spotify
This is a sum-up of a talk I attended at Øredev 2013, where Mattias Björnheden and Per Eckerdal from Spotify talked about how Spotify scaled their mobile teams.
Anna Beatrice Scott - tekhnasthai
This is a sum-up of a talk I attended at Øredev 2013. This year, I will create separate posts for all sessions, instead of having multiple sessions in each post.
Automating with Automator
A useful tool that is never top of mind for me when automating a workflow, is the native OS X (today macOS) Automator app.
Memory leak in iOS when mixing ARC and non-ARC code
I had an iOS app crash after taking a few photos. The stack trace showed a memory leak, but I had a hard time finding it. Turns out that it was caused by mixing ARC and non-ARC. When I tried reproducing it, I launched Instruments to see how the app allocates memory. I started taking photos, editing them, but didn’t encounter a memory leak…until I did.
Hide the default Objective-C initializer
Languages like Java and C# let you override and hide the default constructors of a class. Let’s take a look at how to do the same in Objective-C.
Auto-increment Build Number in Xcode
When I released new version of iOS apps, I used to manually update the build number. It is however better to let Xcode do it automatically. Let’s take a look at how to do it.
Android Activity Lifecycle Car Analogy
In most application frameworks, classes have a lifecycle that is used to do customizations at the proper time. Let’s look at the Android activity lifecycle compared to a car.
Remove Android Activity Title and Icon
My getting-to-know-and-to-love Android journey continues, and has come to themes. This morning, I’ve been learning how to use themes to customize the main action bar.
Android Assets for Various Screen densities
Android devices come in many different flavors compared to iPhone devices. They can be slow, fast, crappy, great, low-res and ultra-hd. To best honor the device running your app, you should provide assets for various screen densities.
Android Fullscreen Activity
The best way for me to learn, is to write about it. This way, I can return to earlier posts and see that I knew nothing once, and that I have learned a few things. Today, I will honor that strategy by publishing a simple class that can be used for fullscreen Android activities.
Run Lint in Android Studio
As I just started learning Android, I was happy to see that linting is such an integral part of the development process. Let’s see how to set it up in Android Studio.
Android Glossary
I’m currently getting started with Android development, which means that I have many new things to learn. The biggest challenge with learning a new language is not the syntax itself, but the tools and conventions. Let’s look at some acronyms that are worth remembering.
Enable USB Debugging on Android Devices
I’m currently getting started with Android Development. Today, let’s take a look at how to enable USB debugging on Android devices, which I had some problems with.
Multiple SSH Files
When working with git, I use a single SSH key pair for GitHub, GitLab, etc. Today, though, I had to add a second key pair to be able to clone another remote repository.
New legal label in MKMapView
I used Google Maps in some of iOS apps, until Apple launched their own map engine. So, now I use Apple Maps. And it adds an annoying little label. Damn.
Oredev 2012 - Day 3
My third and last day at Øredev 2012 had some really nice talks, as well as a subpar one.
Oredev 2012 - Day 2
My second day at Øredev 2012 was amazing! When it was over, I had to sit down and take it all in. There were so many great talks, and I still had to skip many that I wanted to see.
Øredev 2012 - Day 1
I am happy to once again attend Øredev in Malmö, Sweden. Three days with great talks and nice friends is just what is needed in the dark, Swedish November.
iOS Bounce Animation
I have an app where tapping various icons bounces the icon, plays a sound and takes the user to another part of the app. Let’s see how the bounce animation was made.
Localization in Objective-C
This post shows how to localize your iOS apps in several locales. I’ll will describe how to translate plain text and how to create localized versions of your storyboards.
JSON in iOS
Working with JSON is easy in iOS 5, since there’s now a great, native JSON serializer and deserializer that handles everything for you.
Retrive Core Data objects with case-insensitive comparison
I’m currently building an iOS app that uses core data for data persistency. It works great, but as I started retrieving entities by name, I noticed that they arrived in a strange order:
DevSum 2012 - Day 2 Summary
This is a short summary of the second day of the DevSum 2012 conference in Stockholm, Sweden.
DevSum 2012 - Day 1 Summary
This is a summary of the first day of the DevSum 2012 conference in Stockholm, Sweden.
Adding photos to the iPhone simulator
I’m building an iOS app that makes use of the device camera. It works well, but since I’m also using the simulator, I want to be able to select pictures from the photo library as well.
Øredev 2011 in the rear-view mirror – Part 6
This is the final part of my Øredev 2011 summary. It covers the last three talks I attended and concludes my visit to Øredev.
Øredev 2011 in the rear-view mirror – Part 5
This is the fifth part of my sum-up of Øredev 2011. These sum-ups were supposed to be rather short, but have grown out of proportions. I will try to keep it down.
Øredev 2011 in the rear-view mirror – Part 4
This is the fourth part of my Øredev 2011 summary. It has taken a long time to get it done, so I will write a bit less about each session and refer to external resources instead.
Øredev 2011 in the rear-view mirror – Part 3
This is the third part of my sum-up of Øredev 2011, which took place in Malmö, Sweden.
Øredev 2011 in the rear-view mirror – Part 2
This is the second part of my sum-up of Øredev 2011, which took place in Malmö, Sweden.
Øredev 2011 in the rear-view mirror – Part 1
Two weeks ago, I attended to the Øredev Developer Conference in Malmo, Sweden. It was truely inspiring. In this series of sum-ups, I will try to summarize the talks I went to.
Tweaking NDepend CQL rules
After learning how to automate and schedule NDepend to run for several solutions at once and starting to use NDepend more regularly, the power of CQL has grown on me.
Scheduling NDepend for a set of solutions
I use NDepend to continuously run a scheduled code analysis on a bunch of solutions that make up a large part of the software infrastructure of a major Swedish company.
Grabbing the latest version number from a GitHub repository
I have several GitHub repositories, where some have a gh-pages
branch with a public web site. On these web sites, I want to show and link to the latest version.
Clone a .NET solution in no time
When working with .NET, I sometimes find myself wanting to just clone a solution instead of setting everything up from scratch over and over again.
Print screen in BootCamp using an Apple keyboard
I have started to boot Windows directly from a BootCamp partition on my iMac instead of running it with VMWare Fusion. This way, I don’t share resources with the OS X partition.
How I solved my slow iMac with a constantly working hard-drive
A couple of days ago, I blogged about solving a problem that made my iMac very slow. At that time, I wasn’t sure if I had actually solved the problem. I can now say that I have.
Slow iMac about to be fixed?
I have been having big problems with my iMac 27″ (4GB RAM) that runs Windows 7 on a Boot Camp Partition (using VMWare Fusion), where it writes constantly and is super slow.
Trying out Plupload
The team behind Tiny MCE has created a great upload component called Plupload
that supports many runtimes, such as from jQuery-based HTML uploads, Flash, Silverlight, etc.
HTML5 localstorage
I have spent some time experimenting with the new HTML 5 localStorage
feature, which simplifies storing data in browser storage using JavaScript.
Getting started with git and GitHub
As some of my projects are coming together, I want to move them from Google Code to GitHub. Tonight, I decided to give it a try and say hello to git and GitHub.
onSelectRow fix for jqGrid
I love the jqGrid jQuery plugin. If you haven’t tried it, you should. However, onSelectRow
doesn’t work that well. Let’s fix it.
Getting started with NDepend 3
I have finally got my thumb out and added an NDepend project to one of my hobby project solution, to get some analyzing done. Let’s have a look!
Animation disables font in Internet Explorer
As I built a simple site to show how easy it is to get fonts.com Web Fonts up and running, I noticed that Internet Explorer disables custom fonts during animations.
Fonts.com web fonts
The time has finally come to throw Arial and Verdana into the trash (Helvetica can stay), as Monotype, Linotype & ITC have teamed up to develop a really cool service - web fonts!
Make a div container adjust to floating children
Today, a collegue showed me a CSS fix for a problem that happens when a div container has nested, floating divs.
jQuery, MooTools, object inheritance and JSON
I use both MooTools and jQuery in various projects. As I move more towards jQuery, I only use MooTools for its nice type and JSON capabilities. Let’s see how to add this to jQuery.
Hide successful tests in QUnit
I’m using QUnit as test framework for my JavaScript development. It’s not as nice as NUnit is for .NET or SimpleTest for PHP, but it’s easy to get started with.
Find the shortest path in a grid in XNA
I’m playing around with a board game engine in XNA, where players can play missions on a tile-based board. I’m now working on using the A* algorithm to find paths between tiles.
Generate a game board map from a bitmap
I’m building an adventure board game in XNA, where missions take place on a board that is made up of square tiles. It’s a lot like the amazing, old board game Hero Quest.
Load all assets in a folder in XNA
I have started looking at XNA and working on a small game. This post show how to load all assets in a folder, which is convenient for small games with not that many resources.
Auto-eject external drives when Macbook goes to sleep
Edit Aug. 28, 2010 - SleepWatcher
has been changed and now differs from the information found below. This approach still works, though, as does the modified script.
Using Moq with NUnit
As I continue to work with unit tests, I have noticed that some of my development patterns have started to change…for the better.
Twitter vs Jaiku
I’ve been trying out Twitter and Jaiku for a while now. Since both provide more or less the same set of features, I have evaluated which I think will best fit my needs going forward.
Internet Explorer document.body.appendChild(...) problem
On my spare time, I build a web app on OS X and thus test my sites in Firefox, Safari and Opera. More seldom, I also verify that it works in Internet Explorer. Or doesn’t.
Avoid empty img src values
In this post, we’ll discuss how empty image src values can ruin the performance of a web site, and how you can to solve it.