PreviewView icon indicating copy to clipboard operation
PreviewView copied to clipboard

Doesn't work in large app

Open linlinyao1 opened this issue 3 years ago • 1 comments

SwiftUIPreview render exceed 30 seconds and throw error when preview a custom view inside a large app (take over 10 mins to compile)

linlinyao1 avatar Aug 24 '21 13:08 linlinyao1

Yep! I thought I'd put a note the README in about that 🤔

Unfortunately there's not much that can be done about it as it is a timeout enforced by Xcode. Though interesting that you're seeing a 30 second timeout, as the default is usually 5 seconds. You could try to break down the app into smaller components (frameworks) that can compiler faster, I've had more success with that, but unfortunately slow compile times will always give you mixed results.

theoriginalbit avatar Aug 24 '21 23:08 theoriginalbit