API availability in Swift

WWDC is coming pretty soon, and we are going to use a bunch of new APIs. But how to use new APIs available only for the latest version of iOS? This week we will learn about availability conditions in Swift.

File importing and exporting in SwiftUI

A few weeks ago, we talked about photo and video picking in SwiftUI. Today we will continue the topic and learn how to import and export files in SwiftUI views. Fortunately, it is straightforward to do with the help of new fileImporter and fileExporter view modifiers.

The power of overlays in SwiftUI

An overlay is a view drawing on top of another view. And today, we will talk about two interesting use cases of using overlays in SwiftUI. One of them allows us to keep the structural identity of the view, and another one becomes very handy whenever you build custom navigation transitions.

PhotosPicker in SwiftUI

Nowadays, many frameworks Xcode provides us contain SwiftUI views, including the PhotosUI framework. The PhotosUI framework provides the PhotosPicker button, allowing us to offer photo-picking functionality in our apps quickly. This week we will learn how to use the PhotosPicker view in SwiftUI.

ImageRenderer in SwiftUI

I work on a medical app where the user needs to export health data rendered using the Swift Charts framework. It was straightforward to achieve by leveraging the power of the new ImageRenderer type. This week we will learn how to use the ImageRenderer type to export SwiftUI view as image or PDF.

Mastering Canvas in SwiftUI

You can draw 2D graphics in SwiftUI using Shape API, but in the end, the framework converts all the shapes into SwiftUI views and render them. This approach has its pros and cons. Fortunately, we can draw rich 2D graphics without combining multiple shapes. This week we will learn how to use Canvas view in SwiftUI.

Drag and drop transferable data in SwiftUI

Last week we discussed the new ShareLink view and the Transferable protocol powering it. The new Transferable protocol is useful for sharing your data from the app, but it also powers drag and drop in your app. This week we will learn how we can drag and drop data conforming to the Transferable protocol in SwiftUI.

Sharing content in SwiftUI

Apple introduced a brand new CoreTransferable framework and ShareLink view in SwiftUI, allowing us to share and export content from our apps very declaratively. This week we will learn how to make data transferable and use the new ShareLink view in SwiftUI.

Activities and attachments in the XCTest framework

Today I want to continue the topic of UI testing in Swift by covering another great set of tools the XCTest framework provides us. I love UI testing and protecting the primary user flows in my app. This week we will talk about the hidden gems of the XCTest framework, which are activities and attachments.

Performance testing in Swift using the XCTest framework

In Swift, we can do performance testing using the XCTest framework, which is a part of the Xcode development environment. XCTest provides a comprehensive set of tools for writing, running, and analyzing unit and performance tests for Swift applications. This week we will learn how to do performance testing in Swift using the XCTest framework.