Swift Macros got introduced in the WWDC 2023 release of Swift 5.9. They are a new way for you to extend Swift with new kinds of expressions, allow creating of expressive libraries, and eliminate extraneous boilerplate. As part of the vision of Macros, Swift Macros introduce a new way to extend the compiler with custom …
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 failure or empty search results. It’s essential to explain an empty state and its cause to your users. While you can generate custom empty states, reusing standard SwiftUI components is convenient. Doing so will speed …
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 on a Server. You can create dedicated Swift Packages containing sharable logic for both client and backend. While many developers mention sharing Swift code as one of the benefits of Swift on the server, it’s …
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 your app by browsing through the App Store inside one of Apple’s curated lists of apps. I’ve been developing apps since 2009, and several of my apps got featured over time. It’s essential to know …
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 which we know from Objective-C, although they’re different in usage, as I’ll explain in this blog post. Ranges allow us to write elegant Swift code by using the range operator. Your first time working with …
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 open in the app browser by default, but you can configure specific paths to open in your app if the user has it installed. Redirecting users into your app is recommended to give them the …
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 internet connection, so optimizing your app for bad networking conditions is essential. We can leverage several techniques to optimize our app accordingly, but it’s essential to be aware of common mistakes when you do. After …
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 deep linking to a recipe or movie based on the tapped link. You can determine the destination page based on the metadata provided by the URL. You can use a view modifier in SwiftUI or …
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 system settings and are often used for applications like firewalls and VPN services. While Apple provides several sample applications like this for filtering network traffic, they don’t have an excellent explanation for testing and 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 on top of the iPad Simulator. Running apps from Xcode will run on this Simulator directly, and debugging works as usual. The window might be small, but reading most of the code is still …