Could not determine Xcode version:Could not get Xcode version: /Library/Developer/CommandLineTools/usr/bin/xcodebuild does not exist on disk

Hi Team,
I’m trying to pre-launch the application on simulator, when I launch the Appium I’m getting the folowing message,

Launching Appium with command: ‘/Applications/Appium.app/Contents/Resources/node/bin/node’ lib/server/main.js --address “127.0.0.1” --command-timeout “7200” --pre-launch --platform-version “8.1” --platform-name “iOS” --app “/Applications/App/Payload/eServicesSTG_16.app” --show-ios-log --device-name “iPhone 6”

info: [debug] Starting Appium in pre-launch mode

info: Pre-launching app
info: [debug] Using local app from command line: /Applications/App/Payload/eServicesSTG_16.app
info: [debug] Creating new appium session 3d00c1ee-641b-47c3-86a8-82237b7aeb39
info: [debug] Removing any remaining instruments sockets
info: [debug] Cleaned up instruments socket /tmp/instruments_sock
info: [debug] Setting Xcode folder
info: [debug] Setting Xcode version
info: [debug] Setting iOS SDK Version
info: [debug] Cleaning up appium session

error: Could not determine Xcode version:Could not get Xcode version: /Library/Developer/CommandLineTools/usr/bin/xcodebuild does not exist on disk.

My Mac version : 10.9.4
java version : 1.8
Xcode -6 & 5
Appium 1.3.5

Could anyone please help me to come out of this problem ?

Thanks,
Pavithra

What does appium-doctor return? Did you select xcode? http://stackoverflow.com/questions/9600615/xcode-stops-working-after-set-xcode-select-switch

Hi @kirill
Thanks,
I checked with Appium doctor, everything is fine for iOS. only Android_Home is not set. I have seen that link in my Xcode folder I don’t see any other sub-folder, it seems to be empty, Path of my Xcode is Library/Application Support/Xcode. I ran the following command sudo xcode-select -switch /Library/Application Support/Xcode it returns Xcode-select invalid argument ‘Support/Xcode’

Are sure it is not in Applications folder?

Yes @kirill , I don’t have a folder named Applications in my Library. I see Application Support folder inside my Library.

And you should not. There are two Application folders located in the root and user directory.

@kirill I’m not getting you, could you please explain it again ? since I’m newbie to mac and appium-iOS, I’m not that much aware of these things.
Thanks

Your applications are located in home directory ~/Applications/ and root directory /Applications/. So, your Xcode has either path ~/Applications/Xcode.app, either path /Applications/Xcode.app.

Thanks @kirill, I just uninstalled and installed Xcode again. it launches the simulator.

But while pre-launching the app I’m getting the following issue,

info: [debug] [INST STDERR] Instruments Trace Error : Target failed to run: Failed looking up pid of launched process

info: [debug] [INSTSERVER] Instruments exited with code 253

info: [debug] Killall instruments

info: [debug] Instruments crashed on startup
info: [debug] Attempting to retry launching instruments, this is retry #1
info: [debug] Killall iOS Simulator