If you run into any SwiftUI Preview related issue, then there are high chance that you are facing that issue due to some cached preview data. Here are the steps to reset the SwiftUI Preview Caches:

  1. Close Xcode.
  2. Run the following command in the terminal:
    xcrun simctl --set previews delete all
    
  3. Cross-check if all the data is deleted from ~/Library/Developer/Xcode/UserData/Previews directory. If not then you can delete this directory manually by running the following command in the terminal:
    rm -rf ~/Library/Developer/Xcode/UserData/Previews
    
  4. Delete the CoreSimulator caches directory by running the following command in the terminal:
    rm -rf ~/Library/Developer/CoreSimulator/Caches