List of simulators

To test layout build in SwiftUI on different iOS devices you can use preview feature.

ContentView()
        .previewDevice(PreviewDevice(rawValue: "iPhone SE (3rd generation)"))

As you can see PreviewDevice takes raw name of iOS device. It might be problematic to correctly type name of wanted iPhone or iPad. Thankfully, we can run this little command to get full name of device.

xcrun simctl list devicetypes

Leave a Reply

Your email address will not be published. Required fields are marked *