Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Egk

macrumors member
Original poster
May 7, 2014
56
40
Hi,

Just updated to Catalina. With new SwiftUI projects I get the preview functionality with Xcode 11.1, but with a project created in Mojave (still SwiftUI) does not get the preview functionality. Any suggestions? Both projects are SwiftUI and I am trying to preview SwiftUI-files, but I don't even get an option in the menu bar to view it.

Catalina 10.15 (no version number in System Info) and Xcode 11.1 (11A1027).
 

Egk

macrumors member
Original poster
May 7, 2014
56
40
How do I go about to fix that? I thought that when I upgraded to Catalina that issue would sort itself out. Are projects generated in Xcode 11 prior to Catalina missing the runtime layer?
 

casperes1996

macrumors 604
Jan 26, 2014
7,448
5,600
Horsens, Denmark
How do I go about to fix that? I thought that when I upgraded to Catalina that issue would sort itself out. Are projects generated in Xcode 11 prior to Catalina missing the runtime layer?

Terribly sorry, I misunderstood what you wrote. I thought you were running the same project on Catalina and Mojave, and wondering why the Mojave one didn't have live preview, but now I see you wrote "new projects" and "migrated from Mojave to Catalina", not that it was the same on different platforms.

In that case I'm sorry, I haven't tried starting a SwiftUI project on Mojave and migrating it over. Only from the dev previews of Catalina
 

Egk

macrumors member
Original poster
May 7, 2014
56
40
No problem! I could have worded it a bit easier. I am also kind of an idiot because they have worded the option to be 'Canvas' while I was looking for 'Preview' (OPTION+CMD+RETURN). The thing is that the menu item Editor-> Previews will automatically be removed if you don't have Canvas open. I was getting a "false" positive about 'Preview' not existing because I thought it was disabled due to the lack of menu item. Can't say that I am impressed with Xcode lately... some of it is my fault for conflating 'Preview' instead of 'Canvas', but that the corresponding menu items are dynamically removed is just adding to the confusion.
 

casperes1996

macrumors 604
Jan 26, 2014
7,448
5,600
Horsens, Denmark
No problem! I could have worded it a bit easier. I am also kind of an idiot because they have worded the option to be 'Canvas' while I was looking for 'Preview' (OPTION+CMD+RETURN). The thing is that the menu item Editor-> Previews will automatically be removed if you don't have Canvas open. I was getting a "false" positive about 'Preview' not existing because I thought it was disabled due to the lack of menu item. Can't say that I am impressed with Xcode lately... some of it is my fault for conflating 'Preview' instead of 'Canvas', but that the corresponding menu items are dynamically removed is just adding to the confusion.

Hm. Yeah. Preview is what you instinctively look for. I mean, having it greyed out is one thing, but if it were removed entirely when the canvas was closed that's no good. It breaks the UX rule of affordances. :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.