Failed to preview SwiftUI app for macOS in Xcode 12.(0, 1, 3, 4).

Hello! SwiftUI preview does not work. I tried different versions of Xcode, deleting the "Developer" folders, clearing the "Build" folder from the project in Xcode, reinstalling Command Line Tools and Developer Tools. I think that the error appeared after I cleaned Xcode with CleanMyMacX, before that the preview worked.

-MacBook Pro (15-inch, Mid 2012) -macOS Catalina 10.15.7 -Xcode 12.3

Thanks for the feedback!

Hi,

Sorry to hear you are having problems getting previews working. Error -10825 is kLSIncompatibleSystemVersionErr which we generally have folks see if the deployment target of the project is set to something newer than what your macOS is.

Does a build+run of the app work? Does lowering the deployment target of the project to include 10.15.7 work?

Failed to preview SwiftUI app for macOS in Xcode 12.(0, 1, 3, 4).
 
 
Q