Swift UI previewDevice does not show iPad

I followed SwiftUI Tutorials:

https://developer.apple.com/tutorials/swiftui/building-lists-and-navigation


and there s a method

previewdevice

to add device name to prview codes

https://developer.apple.com/documentation/swiftui/view/3278637-previewdevice


here is my code:

struct LandmarkList_Previews: PreviewProvider {
    static var previews: some View {
        ForEach(["iPhone SE", "iPhone XS Max", "iPad Pro (9.7-inch)", "Apple TV"], id: \.self) { deviceName in
            LandmarkList()
                .previewDevice(PreviewDevice(rawValue: deviceName))
                .previewDisplayName(deviceName)
        }
    }
}


so when I do the preview, I can see iPhone, but I just see a blank page in iPad

I'm having the same issue! None of the iPads are working.

Encountered this today myself

Swift UI previewDevice does not show iPad
 
 
Q