Give your simulator superpowers

RocketSim: An Essential Developer Tool
as recommended by Apple

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 or decide to push a view programmatically. The latter enables you to trigger a new screen from a different location in your view. Allowing to push a new screen onto a navigation stack is as … 

 

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 all those app icons into Xcode is often tiresome since we’ve all asked ourselves: “Why can’t Xcode just generate the sizes for us based on a single file?” Well, there’s good news! During WWDC 2022, … 

 

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 out in the App Store and attract more users. Conversions can increase when you ask the user for a rating at the right time. While implementing rating requests is easy, it can become more complex … 

 

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 formats. iOS 15 and SwiftUI 3 introduced support taking away the need to combine text weight for similar results. Markdown isn’t wholly supported (more on that later), but many features like bold, italic, and links … 

 

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 lot, it’s usually not enough to prevent you from finding a certain memory peak during the development of a project. We can use memory graph debugging or Xcode Instruments to help find and fix leaked … 

 

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, and iterated access to its elements. In other words: it’s an asynchronous variant of the regular sequence we’re familiar with in Swift. Like you won’t often create your custom Sequence I don’t expect you to … 

 

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 to replace existing code that is based on closures or Combine publishers. Before diving into details around throwing streams, I recommend reading my article covering async-await if you didn’t do so yet. Most of the … 

 

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 with 1st party APIs 3rd party libraries. In my experience, every developer has their way of handling remote images since there’s no go-to standard. SwiftUI introduced AsyncImage as a 1st party solution to displaying remote … 

 

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 rates. MetricKit data can be explored by going into the Xcode organizer panel in which several metrics are listed. Several techniques exist to improve launch times, but it all starts with gaining insights into how … 

 

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 view since it doesn’t look great when animating. Compared to UIKit, SwiftUI makes it easier to create animated transitions between two states using the animation view modifier. You can see each animation as a transaction …