I have created this localized SwiftUI Test-Project, and I set up this project with a localization package and 2 packages with different views, one using the other one.
I want to show TheParentView, which shows TheChildView, imagine these for a bigger project with several views, in any depth of subviews, separated in packages.
Now Xcode’s XCPreview isn’t able to show the preview for the Child and tends to crash after some time, but it still can for the Parent, even though the code is practically the same.
In the project View, the text is localized and shown totally fine.
In TheParentView package, the view shows the keys instead of the localized strings, that’s fine, due to XCPreview still having issues with fetching the default locale in situations like this.
In TheChildView package, the view can’t be presented and XCPreview crashes after some time.
The exception type is a SIGTRAP that could practically come from anywhere, the first report lines aren’t showing anything useful, just referring to a “first closure on launch”.
XCPreview Exception Type: EXC_BREAKPOINT (SIGTRAP)
I can still build and run the project fine on simulator and device, but without the previews, the development process slows down quite a bit.
Other questions refer to breakpoints due to the exception type, but I don’t have any in the project.
I expect XCPreview to be able to at least show TheChildView like TheParentView with the localization keys or other placeholders handed in the #Preview of the code.