I cannot see a preview for the HandlingUserInput Tutorial Starting Point

Hello,

I am new to XCode and I have started using the tutorials. I am unable to see the Live Preview when I load the StartingPoint file for the HandlingUserInput Tutorial: https://developer.apple.com/tutorials/swiftui/handling-user-input

I know about Opt+Cmd+Return and the menu option, and when I try that in different projects (such as new ones I created myself or previous starting points from the tutorial), it works and pressing those keys or that menu button toggles the visibility of the live preview as expected. For this particular startingpoint, I am unable to load the live preview at all. I couldn't fix some errors in the last lesson and so I want to use this provided startingPoint for this next lesson. Does anybody have any ideas?

Thank you very much!

Hi!

Sorry, could you be more specific? Are you having troubles with the tutorial? Or are there any problems you don't know how to fix..?

I started Swift dev not long time ago, and already got tons of knowledge, for sure might be able to help you.

Hello,

Thank you very much for your reply. I am having an issue with seeing the preview window when I load Project File from the following:

https://developer.apple.com/tutorials/swiftui/handling-user-input

When I open that project even if I press Opt+Cmd+Return or Editor >> Canvas I still cannot see the preview. However if I create a new project or load a different project I am able to see it.

Thank you very much!

Accepted Answer

Which file do you have open when you are trying to get the canvas to be visible?

Try opening the file called ContentView.swift and then make the canvas visible.

Now when I open ContentView.swift it says "File is not under source control" where the preview window should be.

Edit: I deleted the file and downloaded the starting point again and it is working.

I cannot see a preview for the HandlingUserInput Tutorial Starting Point
 
 
Q