The way I resolved the problem is the following: In Products -> Schemes -> Manage Schemes, I created a new scheme with the application instead of the widget extension (which was the default scheme made by Xcode). When I built with this scheme, no error showed up. I think it solved the problem, I just can't test it right now because my developer license isn't activated yet. Thanks to Jackson-G for the help!
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: