While selecting a framework rather than the executable as the active scheme,
SwiftUI preview cannot use: Updating took more than 5 seconds.
However, while selecting the main app target, it can work perfectly.
Repro steps:
SwiftUI preview cannot use: Updating took more than 5 seconds.
However, while selecting the main app target, it can work perfectly.
Repro steps:
git clone https://github.com/imWildCat/NonExecutableTargetCannotUseSwiftUIPreviewDemo
cd NonExecutableTargetCannotUseSwiftUIPreviewDemo
xed NonExecutableTargetCannotUseSwiftUIPreviewDemo.xcworkspace
Select the “SharedUI” target as the active scheme
Open the WebImage.swift source file
Run the SwiftUI preview
I've the same problem. Preview on iOs scheme is working fine but if I switch to macOS scheme I got the same error.
Did you find a fix?