Closed john-work-ios closed 1 year ago
Hi @john-work-ios,
As the WhatsNewKit does not support the watchOS platform please update your Xcode project configuration to exclude WhatsNewKit from your watchOS App Target compilation process.
That's just it, the watchOS target does not have WhatsNewKit in its dependencies. The issue only occurs with SwiftUI previews. Any clue?
I'm also experiencing this issue, so I decided to investigate it further. It seems that it's an issue with Xcode previews (source: Apple Developer forums).
In SwiftUIIntrospect, they fixed it by adding a load of #if !os(watchos)
statements to the code, but I appreciate that it's inconvenient to do that.
A workaround that I've verified is to make a new scheme that's just for previews. See this forum post for instructions.
What happened?
XCode 15 + iOS app (min target iOS 15) + watchOS app (min target watchOS 9). WhatsNewKit as SPM dependency for the iOS app.
Problem: when previewing SwiftUI views for the watch app, I get this error:
` == PREVIEW UPDATE ERROR:
What are the steps to reproduce?
-
What is the expected behavior?
Do not block SwiftUI previews