Post

Replies

Boosts

Views

Activity

Reply to Xcode can not preview [AppName].swift (Xcode 11)
I was super frustrated with this error. New to coding, so I went thru my code line by line trying to figure out why all of a sudden the preview stopped. Both in canvas and the simulator. In my case, it was a simple syntax error: cornerRadius vs. .cornerRadius (the period in front of the modifier was missing)! I was having a hard time accepting this as the reason for this error, Xcode didn't even give me all the errors and red, alerting me to the missing(.). So I tested my theory several times. Simply adding and removing the (.) while previewing in canvas and the simulator. It was that simple syntax error that caused my preview to "take longer than 5 seconds" fail, and the simulator to stall at the white loading screen. Frustrating, but I do love the precision required in coding and the satisfaction of figuring out the issue, at least so far, lol! (Newbie talk!) Hope this helps!!
Dec ’20