screenshot for iPhone home screen

When having my iPhone connected to my Mac via USB cable, how can I take a screenshot of the home screen from a swiftUI app?

I tried using libimobiledevice (idevicescreenshot) but that requires install the developer disk image. When looking for it, it turns that my Xcode (version 15.4) only provides that kind of images up to iOS 16.4.

I have looked everywhere on this site, but couldn't fine the required image or otherwise, how to take the screenshot I need.

Thanks!

You can take a screenshot directly on the iPhone.

Otherwise, why don't you do it on simulator ?

screenshot for iPhone home screen
 
 
Q