In chapter 12, everything worked fine and I could do object selection as expected… until I noticed that the selected object was only highlighted when the app window was on my external display. When I run it on my primary laptop (macbook pro, with Intel i9 and Vega 20 graphics) display, the highlighting is gone. I can move the window back and forth between the displays and the highlighting goes on/off.
I’m afraid I don’t have a non-Apple Silicon device any more to test it
However, this could be related to the scale factor of the device not being x2 (although I thought the MacBook Pro i9 is x2), which I failed to take into account. If you try out the app on iPhone Pro Max, which has a scale factor of 3, it doesn’t work either.
In my case, with my laptop display at 2x and my external monitor at 1x, I put the setting of params.scaleFactor in the draw func instead of init. Now it works when I drag the window from one display to the other.