After you add my line to the application code, the display of the game on the "Simulators" will be broken, but everything will be fine on the real device.
My photo shows iPhone xr simulator And Real iPhone xr device.
This code has also been tested on Iphone X, Iphone 6s, Iphone 7 Plus and Ipad Air 2 and everything works fine.