XCode11 Beta canvas not visible

I followed the instructions in this tutorial. https://developer.apple.com/tutorials/swiftui/creating-and-combining-views


My problem is that i cannot see the canvas to press resume. I can run the code on the simulator, but the canvas does not show up. Even after switching to "Editor only" and back to "Editor & Canvas". Where do i go wrong?


Secondly XCode11 generates a if DEBUG block around the second block of code in ContentView.swift. This is different in the tutorial.


Like:


#if DEBUG

struct ContentView_Previews : PreviewProvider {

static var previews: some View {

ContentView()

}

}

#endif


I am using XCode11 Beta M11336w on an iMac2017 with Mojave with all normal updates installed.

Accepted Answer

Canvas and preview require macOS 10.15 beta to be installed. From the top of: https://developer.apple.com/tutorials/swiftui/creating-and-combining-views


To preview and interact with views from the canvas in Xcode, ensure your Mac is running macOS 10.15 beta.

Means i have to have a second mac for that BETA? Or can i run the BETA in a VirtualMachine on my Mac?


I do not wantv to directly install it on my main machine. ;-)

XCode11 Beta canvas not visible
 
 
Q