Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to locate Xcode. Please make sure to have Xcode installed on your machine

I'm new to Fastlane. Does anyone know how to fix this error from running

fastlane ios myLane.

The output:

[12:50:11]: fastlane finished with errors

[!] Unable to locate Xcode. Please make sure to have Xcode installed on your machine

But I have the newest Xcode (9.3.1) installed from Mac App Store.

Environment info:

fastlane --version

fastlane 2.95.0

which is the newest version.

ruby -v

ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]

like image 788
Benjamin Wen Avatar asked May 18 '18 05:05

Benjamin Wen


2 Answers

Try check Preferences in Xcode under Locations and be sure you have selected your Xcode version in the Command Line Tools dropdown: Select Xcode version

like image 81
Dinsen Avatar answered Oct 17 '22 12:10

Dinsen


CLI approach:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

like image 32
Andrei Konstantinov Avatar answered Oct 17 '22 10:10

Andrei Konstantinov