I used to have all my preview simulator device as iphone12 and I was fine with it. Not sure when, it all changed to I don't know iPhoneSE or iTouch with the thick bar. I did not want to change it back to iPhone12 by using the code .previewdevice() cuz I literally have like dozens of previews waiting for me to change, so I checked what decide the choice of the device. It shows as the screenshot below "inherited". There must be a source where I can the change the setting right? At least somewhere in the setting or I understand this "inherited" the wrong way? Can someone help give some more information about this? Can't believe xCode made this so inflexible...screenshot from my Xcode project,the mysterious inherited
Click on the run destination, which is something like iPhone SE
. Just change it to the desired device type and the inherited device for previews will change accordingly.
If you want a special device type, as you said, just click on the top bar of the preview device and open the Inspect Selected Object
menu (at the bottom of the Canvas
), select the desired Preview
Device
. It will add the code .previewDevice("iPad (9th generation)")
in the code preview section.