Xcode needs to be installed prompt upon running over iOS simulator, while Xcode already being installed.

Bellow are some errors some when users install the fresh Xcode that time user can get these errors. to fix that below have some steps using that you can fix that issue.

✔ Xcode needs to be installed (don’t worry, you won’t have to use it), would you like to continue to the App Store? … yes
✔ You are currently using SDK 40.0.0. Would you like to install client 2.18.4 released for this SDK? … yes
✔ Xcode needs to be installed (don't worry, you won't have to use it), would you like to continue to the App Store? … no
  • Open Xcode
  • go to preferences
  • go to locations tab
  • select an Xcode version in the select labeled “Command Line Tools”

1) Open Xcode

2) go to preferences

go to preferences

3) go to locations tab

Go to locations tab

4) select an Xcode version in the select labeled “Command Line Tools”