Tomas
Tomas

Reputation: 149

I am not able to use SwiftUI previews

Xcode Errors:

I am on Xcode Version 16.2. MacBook Pro M3 Pro.

For some reason, in my project, I am unable to use previews as long as I have DotLottie installed. Actually, it's basically any package because I had swiftui-mail-view installed and ran into the same issue.

The thing is, I created a brand new project and installed the same packages and the previews work just fine.

So clearly there's something wrong with my settings in my current project. I don't even know where to look. I copy/pasted the error into chatgpt and followed their troubleshooting methods of

Nothing has worked. For a while whenever I added simulators, there was always a "Rosetta" version that came with it. Example: adding "iPhone 14" would also add "iPhone 14 (Rosetta)."

I must've messed up in settings somehow. Is there anyway to go back default project and simulator settings?

Upvotes: -3

Views: 42

Answers (1)

Tomas
Tomas

Reputation: 149

I figured it out. All these months of not using a preview. It was as simple as having conflicting values for "Build Active Architecture Only."

For project, I had Debug: Yes, Release: No For target, I had Debug: No, Release: Yes

To fix I set both to Debug: Yes, Release: No

Navigate to Build Settings for BOTH Project and Targets change these settings.

Upvotes: 1

Related Questions