xcodeswiftui-previewsxcode-previews

cannot preview in this file - the request to open "com.apple.dt.CcodePreview" failed


Xcode version 14.3.1 Minimum Deployments 16.4

The problem started when I moved the Xcode to Applications(previously it was in somewhere else).


Solution

  • Things I have tried and worked for me.

    Then Run following command in terminal.

    xcrun simctl --set previews delete all
    

    Open Xcode, Build the project.