Detect os in SwiftUI in this post I am going to be explaining how you can detect OS in SwiftUI. SwiftUI 2.0 allows us to write one base code for every Apple OS. macOS and iOS different navigation user experiences The Happy Programmer