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] at quitAndUninstall (/Applications/Appium Server
[W3C] at /Applications/Appium Server
[W3C] at wrapped (/Applications/Appium Server
[W3C] at retry (/Applications/Appium Server
[W3C] at retryInterval (/Applications/Appium Server
[W3C] at /Applications/Appium Server
[HTTP] <-- POST /wd/hub/session 500 51767 ms - 829

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/)