Up until yesterday I was able to use preview in Xcode. I don't know if it is since my system updated to 13 (I never used the beta) but suddenly I can't use preview with SwiftUI. This is in the same project that was previewing with no issues. In response I have went to preferences-> components and downloaded the simulator for the version I'm trying to simulate, ie. IOS 14.5. This did not help.
Error says
"Xcode is missing components needed to preview on IOS"
Diagnostics says
"PlatformDoesNotHaveAgentsError: Missing required components for iOS
Xcode is missing components needed to preview on iOS
==================================
| HumanReadableSwiftError
|
| LocationError: noBundle
This issue looks to be resolved in Xcode 13.2. Could you please download the latest version from the app store or https://developer.apple.com/xcode/resources/ ? If you are still seeing issues with this version then please do file a new feedback and make sure to include the preview diagnostic!
- When you get an error in Xcode Previews, an error banner appears in the canvas
- Click the "Diagnostics" button in that banner
- In the sheet that appears, click "Generate Report" in the bottom left of the sheet
- Attach (or make from the folder) the resulting zip file to the bug (will be named something like
previews-diagnostics-0123456789.zip
)