Cannot Preview in this file

I'm running XCode 11.0 Beta 5 on Catalina 10.15. I downloaded the Drawing Paths and Shapes module of the SwiftUI tutorials and Badge.swift and related files throw this error:


Landmarks.app crashed: Error Domain=render service Code=12 "Rendering service was interrupted" UserInfo={NSLocalizedDescription=Rendering service was interrupted}


I cleaned the project folder, restarted XCode - still won't preview.


Am I missing something?

Replies

I have also faced the same issue many times. But after reviewed the source code I found an issue with my another file which is I have used to display details view and indirectly connected with the current source code. Unfortunetly xcode is not highlighting that issue rather than it is saying "Error Domain=render service Code=12 "Rendering service was interrupted" UserInfo={NSLocalizedDescription=Rendering service was interrupted}".


In your case it may be not be the same still you can give a try to review your code once again.

I got the same thing. I noticed the file was created at the top level of the directory and just moved it next to all the other .swift files in the Landmarks folder and it started working!