Group Group Group Group Group Group Group Group Group

Xcode Editor Preview function is not working properly

Hi,
I’ve just started the IOS Apprentice tutorials, both the online videos and the book. The Xcode Editor preview panel does not work as presented in either the video or the book.

My equipment: iMac 2019 3.6GHz Quad-Core i3 processor, 16 GB Ram, Catalina 10.15.4
Xcode version: 11.4.1

I’m only at the very beginning tutorial with the Hit Me button and Pop Up alert when the button is pushed. The Preview is set to iPhone XE (2nd gen), but this doesn’t seem to affect the performance. The Preview is very slow. It can take 1 - 2 minutes for the Preview to refresh. I had to turn off automatic refresh. It will not allow me to add the 2nd button on the Preview pane. I press the “+” button, click, hold and drag the “button” object to the preview pane. No positioning line appears under the Hit me button as expected. When I release the mouse button, the new button object does not remain on the preview pane and is not added to the code.

What am I doing wrong?

Use DevCleaner app to clean your Xcode files and it will delete unwanted files, make sure you select your removable hard drive as your main storage location

Hi Paul,
Thank you for the suggestion. I’ll download and run the app and let you know how that worked.

In the meantime, I closed out of everything and reopened Xcode. That did reset the canvas and it worked OK today. The only thing is that both the Canvas preview and the Simulator take a very long time to refresh/run the first time. Subsequent preview refresh or simulator runs go faster. Must be some sort of cache loading going on.

Thanks again,
Jim

Cool! Thank you for the tip.

Paul and Lewis,

I’ve tried both your suggestions. So far, the performance is much better. The initial canvas preview and simulator loads are slow, but afterwards canvas refresh and re-runs are pretty fast. Thank you for the help.

@jcntcc Do you still have issues with this?

No. The performance issues have resolved. The truth is I purchased a more powerful iMac. The stronger processor and additional memory have helped significantly. Thanks for asking.
Jim