First Swift App

Hi, I am fairly new to swift and Xcode and am trying to start my first swift app. I downloaded and opened Xcode, clicked on start new project and named it and everything. Then when I tried to run it before putting any code in to see if the default screen will show up on my simulator I ran into these errors

I know this is a lot that I just copied and pasted but this is what Xcode gave me. This is my first time running a swift app in Xcode. I have run flutter apps before that use Xcode but never actually ran it from Xcode. I don't know why it isn't letting me run a simple basic app. Any help would be appreciated. Thanks

To add I just restarted my Mac, deleted and re-downloaded Xcode and have done shift-command-k to clean Xcode nothing has worked.

Accepted Answer

I some how solved it. After repeatedly deleting and re-installing Xcode in many different ways. I started clicking around and ended up clicking on Xcode -> Toolchains -> And realized that my toolchain was set to swift development snapshot instead of Xcode 13.2.1 (my current latest version at this time). The snapshot was from 2020 so no wonder it wasn't running properly. I still don't know too much about the toolchains except for what I recently looked up. It simply is used by Xcode to run, build and debug the app so since I was using the wrong one it was giving me that error.

First Swift App
 
 
Q