SwiftUI preview failure, Failed to launch swiftc: 'swiftc too many arguments' reason?

Viewed 93

I have a large mixed language (obj-c, swift & c++) project, it builds and runs fine on all platforms

"Build for previews" also seems to complete fine.

Opening preview of a particular swift file fails, e.g.: enter image description here

Diagnostics gives:


Failed to launch swiftc.

==================================

|  HumanReadableNSError: NSInvalidArgumentException
|  
|  com.apple.dt.PreviewsFoundation.ExceptionError (0):
|  ==NSLocalizedFailureReason: too many arguments (4670) -- limit is 4096

I have managed to get previews to work previously. I switched to using prebuilt xcframeworks in the hope of improving the preview build performance, but has gone from slow to not working at all!

0 Answers
Related