18. The Anatomy of a Basic SwiftUI Project
When a new SwiftUI project is created in Xcode using the Single View App template, Xcode generates a number of different files and folders which form the basis of the project, and on which the finished app will eventually be built.
Although it is not necessary to know in detail about the purpose of each of these files when beginning with SwiftUI development, each of them will become useful as you progress to developing more complex applications.
The goal of this chapter, therefore, is to provide a brief overview of each element of a basic project structure.
18.1 Creating an Example Project
It may be useful to create a sample project to review while working through this chapter. To do so, launch Xcode and, on the welcome screen, select the option to create a new project. On the resulting template selection panel, choose the Single View App option before proceeding to the next screen. On the project options screen, name the project ProjectDemo...