Give your simulator superpowers

RocketSim: An Essential Developer Tool
as recommended by Apple

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 @ObservedObject will redraw your view based on a changed value. This is often expected behavior, and things look like they should. However, in so-called Massive SwiftUI Views (MSV), there could be many different triggers causing … 

 

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 becomes visible next to your active Simulator to provide additional functionalities while not too intrusive. Some significant features include recordings with touches, audio, and bezels, location simulation, Simulator airplane mode, and several design comparison features. … 

 

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. You can use this technique to win back users who canceled their subscription or to upsell users from a monthly to a yearly plan. Implementing promotional offers differs per project depending on whether you use … 

 

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 a key-value store backed by a property list (plist) file. Due to this type of backing store, you need to be aware of the supported storage types. There are a few best practices when working … 

 

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 synchronize access to mutable states and prevent data races. However, developers commonly misunderstand how actors dispatch to threads in non-async contexts. It’s an essential understanding to avoid unexpected crashes. Before we dive deeper into the … 

 

@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 introduced by Apple, we were writing non-structured asynchronous code, mainly using closures. On our road to Swift 6, we must prepare our projects for strict concurrency checks done by the compiler. The SE-0337 proposal makes … 

 

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 which minimum iOS version your project should be set. It’s an important decision in a developer’s job and not something you can do without reasoning. We can be fortunate with the iOS adoption rate in … 

 

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 arguments with distinct types. As a result of SE-393, SE-398, and SE-399, you can use this new feature from Swift 5.9. One of the most noticeable places of impact is the 10-view limit in SwiftUI, … 

 

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 action or provide content as a result. Using intents, you can extend custom functionality and data to support system-level services like Shortcuts, Siri, Spotlight, and the Action button. You might have created App Intents Spotlight … 

 

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 feature resembles Swift 5.1’s ability to omit the return keyword in single expressions inside closures. While shorter code doesn’t necessarily always lead to more readable code, omitting return keywords inside if and switch expressions certainly …