40. A SwiftUI DocumentGroup Tutorial

The previous chapter provided an introduction to the DocumentGroup scene type provided with SwiftUI and explored the architecture that makes it possible to add document browsing and management to apps.

This chapter will demonstrate how to take the standard Xcode Multiplatform Document App template and modify it to work with image files instead of plain text documents. On completion of the tutorial, the app will allow image files to be opened, modified using a sepia filter and then saved back to the original file.

40.1 Creating the ImageDocDemo Project

Begin by launching Xcode and create a new project named ImageDocDemo using the Multiplatform Document App template.

40.2 Modifying the Info.plist File

Since ...

Get SwiftUI Essentials – iOS 14 Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.