4

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!

7
  • Same problem here. Did you manage to find a solution for this? Commented Aug 10, 2022 at 14:45
  • 1
    I did get it working, but what I did was to rewrite the view somewhat - so there is nothing concrete I can attribute it to, I'm afraid. It was quite a complex view which I broke down into smaller ones...so my best guess is some kind of cyclomatic complexity issue... Commented Aug 10, 2022 at 14:57
  • cool, but I have this error on a view that is literally var body: some View { Text("Hello, World!") } Commented Sep 6, 2022 at 12:29
  • Oh, wow. Can you reproduce on a reasonably clean project? Worth raising a radar bug I imagine... Commented Sep 6, 2022 at 15:07
  • Unfortunately not, the project is big and under NDA, but this is a newly generated module with an (almost) empty view and it doesn`t work Commented Sep 7, 2022 at 7:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.