Failed to launch WDA ( After upgrading to xcode 16.2, simulator 18.0 )

Getting error:

Failed to create session. An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent. Original error: xcodebuild failed with code 70. This usually indicates an issue with the local Xcode setup or WebDriverAgent project configuration or the driver-to-platform version mismatch.

xcode version: 16.2
Appium version: 2.16.1
iOS simulator: 18.0
xcuitest version: 7.35.1

Earlier I was using xcode 15.4 and xcuitest 5.16.1 and it was working fine.
It started failing after updating to new xcode version and new xcuitest version.

Did you rebuild WDA?

yes, I rebuild WDA. By rebuilding you mean building the WDA project on xcode right ?

Yes. Enable debug logs, find exact command that fails.

When I rebuilt WDA, it didn’t fail. How do we know exactly which command fails

enable DEBUG Appium server logs