title: SwiftUI unable to restrict to landscape only
body: <p>I am trying to build a landscape-only app in Xcode 13 and SwiftUI. I notice even if I have unchecked &quot;Portrait&quot; orientation, the app will still work in portrait mode. I am unable to force the app to work in landscape mode.</p>
  <p>This is the Device Orientation Settings:</p>
  <p><a href="https://i.stack.imgur.com/SqMZW.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/SqMZW.jpg" alt="enter image description here" /></a></p>
  <p>This is the simple hello world SwiftUI:</p>
  <pre><code>import SwiftUI
  
  struct ContentView: View {
      var body: some View {
          Text(&quot;Hello, world!&quot;)
              .padding()
      }
  }
  
  struct ContentView_Previews: PreviewProvider {
      static var previews: some View {
          ContentView()
      }
  }
  </code></pre>
  <p>Expected:</p>
  <p>&quot;Hello world&quot; rotated 90degree clockwise when device in portrait mode. Forcing user to rotate the device to landscape mode to view correctly.</p>
  <p>Actual:</p>
  <p>&quot;Hello world&quot; still renders correctly in portrait mode. Why?</p>
  <p><a href="https://i.stack.imgur.com/TzykI.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/TzykI.jpg" alt="enter image description here" /></a></p>