What is Nostr?
John Siracusa /
npub1lq7…hwvl
2024-12-24 04:08:56

John Siracusa on Nostr: Q: Why is Xcode no longer able to render a preview of my SwiftUI view? A: ...

Q: Why is Xcode no longer able to render a preview of my SwiftUI view?

A: *Sometimes*, the answer is that you’ve got a call to a log method on a Logger object in a code path that’s executed when rendering a preview but rarely or not at all otherwise, and this call passes a string without any values interpolated into it (e.g., logger.log(“Hello”)). This causes an error, and this error is only visible in the big spew of output available through the stethoscope icon in the preview pane. #SwiftUWhy
Author Public Key
npub1lq7l458c6zqqgta485wgsw4eddwprfsmzaxu59ws2znyccdh9pas7vhwvl