SwiftUI Detecting Xcode Previews This reference article covers how to use environment values to detect if a process is running in a Xcode preview.