Cannot preview in this file - Failed to update preview

Hello!

I've been trying to develop my first Swift and iOS application, but I'm trying to take one step at a time. I installed xCode and created my first SwiftUI project, and I did nothing with it, didn't modify it, it's the plain Hello World application. Now, the first thing I wanted to do was to preview the app on my own device, so I followed the steps to that. But when I try to preview the app on my phone, I get the error in the title. This is so strange, cause both my phone and my mac are on the latest softwares, and it's really just the plain starting project, nothing else added. I've seen this problem all over the forums and StackOverflow, but I had no luck in fixing the problem with those solutions so far.

I don't really know what to include, so here is the diagnostic message:


RemoteHumanReadableError: Failed to update preview.

Error encountered when sending 'display' message to agent.

==================================

| RemoteHumanReadableError
|  
| LoadingError: failed to load library at path "/private/var/mobile/Containers/Data/Application/E7DA406F-45A9-4A13-B424-EEC934C6FA04//tmp/1433213E-46DF-4CA8-A16A-CCDBA9545F1C-ContentView.2.preview-thunk.dylib": Optional(dlopen(/private/var/mobile/Containers/Data/Application/E7DA406F-45A9-4A13-B424-EEC934C6FA04/tmp/1433213E-46DF-4CA8-A16A-CCDBA9545F1C-ContentView.2.preview-thunk.dylib, 2): no suitable image found. Did find:
|  /private/var/mobile/Containers/Data/Application/E7DA406F-45A9-4A13-B424-EEC934C6FA04/tmp/1433213E-46DF-4CA8-A16A-CCDBA9545F1C-ContentView.2.preview-thunk.dylib: code signature invalid for '/private/var/mobile/Containers/Data/Application/E7DA406F-45A9-4A13-B424-EEC934C6FA04/tmp/1433213E-46DF-4CA8-A16A-CCDBA9545F1C-ContentView.2.preview-thunk.dylib'
| )

If you need anything else, please let me know.

Thank you in advance for all your help, it's truly appreciated, because I've been going mad about this issue for a couple of days now.

Cannot preview in this file - Failed to update preview
 
 
Q