dyld: Library not loaded: @rpath/libswiftCore.dylib error when launching iOS app
Hello everyone! I'm new to Swift and Xcode, and I've encountered a confusing error. I created a simple iOS project (Single View App) in Swift, added a couple of UI elements (UILabel, UIButton) and wrote some simple code to handle button presses. Everything compiles without errors, but when I try to run the app on the iPhone 14 Pro simulator (iOS 16.4), it crashes immediately after launch with the following console message:
```
dyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /Users/username/Library/Developer/CoreSimulator/Devices/.../App.app/App
Reason: no suitable image found. Did find:
/Users/username/Library/Developer/Xcode/DerivedData/.../Build/Products/Debug-iphonesimulator/libswiftCore.dylib: mach-o, but wrong architecture
```
I've already tried:
1. Cleaning DerivedData (Produ