LandmarkList preview failed, click the Diagnostic button on top of the preview canvas shows:
Landmarks.app crashed: Error Domain=render service Code=12 "Rendering service was interrupted" UserInfo={NSLocalizedDescription=Rendering service was interrupted}
The Xcode console at the bottom shows:
2019-07-11 12:40:04.071467-0700 Landmarks[6420:515507] invalid mode 'kCFRunLoopCommonModes' provided to CFRunLoopRunSpecific - break on _CFRunLoopError_RunCalledWithInvalidMode to debug. This message will only appear once per execution.
Message from debugger: Terminated due to signal 15
2019-07-11 12:40:08.380137-0700 Landmarks[6420:516007] [connection] Connection interrupted: will attempt to reconnect
The app runs fine in the simulator...
Did I just encountered a Xcode bug? Is there anything I can do to get this preview working?
Another view LandmakRow in the app preview works.
Kind of strange that everything compile, can run in simulator, one view can preview, another just fail
Are you on section 4, step 2 of the Building Lists and Navigation tutorial? (That's what it looks like to me based on your screenshot.)
If so, you haven't reached the part where you need to use environmentObject(_:) yet.
I think you're running into a bug (55670957) related to the visibility of preview provider types in newly created files. To work around it, swap out LandmarkDetail for LandmarkList where you create a hosting controller in SceneDelegate.swift, then make a clean build of the project. (Section 7, step 9 contains this same change.)
Take a look at the link at the end of my last post, the blue highlighted section of the code listing section 7, step 9 is what you should try out as a fix for your error. It changes line 15 of the scene delegate to: