Greetings, I want to force my app's Orientation. Most solutions for "How to force orientation to Landscape for SwiftUI" seems works only for "real" SwiftUI project, not .swiftpm
How can I force orientation to landscape for Swift Playground App Project?
You can open 'Package.swift' and under supportedInterfaceOrientations
which should be
supportedInterfaceOrientations: [
.portrait,
.landscapeRight,
.landscapeLeft,
.portraitUpsideDown(.when(deviceFamilies: [.pad]))
]
remove .portrait' and '.portraitUpsideDown(.when(deviceFamilies: [.pad]))
, and therefore the final code should be
supportedInterfaceOrientations: [
.landscapeRight,
.landscapeLeft,
]
Hope that helped!