How to update iOS simulator in mac os

To update the iOS simulator version for iOS development run:

xcodebuild -downloadPlatform iOS

For when you encounter errors like:

{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 17.4 is not installed. To use with Xcode, first download and install the platform }