Issue connecting appium inspector with IOS device

I am connecting appium Inspector with IOS device or simulator. Have got the web-driver agent successfully installed on it but still keeps giving me this issue which is to do with xcode build but the build is succeeded so can’t really understand what is going on. I am using Appium2

[W3C] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[W3C] xcodebuild error message:
[W3C]
[W3C] at quitAndUninstall (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:585:15)
[W3C] at /Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:620:11
[W3C] at wrapped (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:60:13)
[W3C] at retry (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:43:13)
[W3C] at retryInterval (/Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:70:10)
[W3C] at /Applications/Appium Server GUI.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:600:7
[HTTP] <-- POST /wd/hub/session 500 51767 ms - 829
[HTTP]

You say you are using Appium 2, but there is no GUI server for Appium 2. Instead of starting GUI, maybe try starting Appium 2 from command line with command: appium

make sure you leave the Remote Path field on appium inspector empty. meaning just / this is the default path for appium 2.x (instead of wd/hub/)