I believe I have hit the same issue. Using Legacy Previews Execution is a TEMPORARY fix for the moment, but I would be happy to contribute any diagnostic info to help resolve this.
Broad facts:
- Our Swift Package references a binary XCFramework (which is statically linked for iOS devices and simulators; it's a Rust shared library so we cannot change the structure).
- SwiftUI previews, even ones which do not reference the shared code, fail with a runtime link error complaining about JIT and not being able to find all(?) of the symbols from our static library framework.
- Enabling legacy previews works
- There have never been any issues running either on device or on a full simulator; the binary framework is fine.
You can find an up to date log of similar issues we've identified, error logs, and more here: https://github.com/stadiamaps/ferrostar/issues/344.
Regarding the request for diagnostics @Frameworks Engineer , I gave this a shot last week but am unsure how to proceed. The instructions appear to be highly specific for on-device previews, which are not a normal workflow for anyone I know (we use previews on our macs). I tried to do the device previews, but was unsuccessful figuring out how to trigger a sysdiagnose at the right time. (I did get the profile installed, but the instructions for how and when to generate the sysdiagnose were extremely confusing). If you can provide any help, I'd be happy to gather any information I can to help you identify the root cause.