If you`ve ever gone through the process of automating Xcode installations, you`ve undoubtedly encountered the problem of making sure that the license for Xcode and the included SDKs has been accepted. An unlicensed Xcode looks like this at the first launch and asks for administrator rights: How it works, as others have pointed out: you can sign up for free as an Apple developer; The Development IDE (Xcode) is free and available on any Mac. Alternatively, simply start Xcode by double-clicking the icon and accept it when the license agreement is displayed. Update for new information: It looks like this could be a MATLAB issue. Which version of Xcode is running? Check with MATLAB to see if this is a supported version. This useful trick with xcodebuild works when you only need to deploy one Xcode application, but the situation becomes less clear when you manage several on a single machine. And you may have seen from time to time that you install a different version of Xcode (or a beta version) on your own computer, which you have to accept the license again. What exactly is going on here? Also – when I was running on Sierra, I had to run first: sudo xcode-select -s / Applications / Xcode .app / Contents / Developer Several versions of Xcode mean that you have to accept different versions of the agreement. There are two important conclusions about this: The ”acceptance status” of the license for Xcode is stored in a list of properties located in /Library/Preferences/com.apple.dt.Xcode.plist. It is not accessible with a parameter API, but only read and write to a property list file. There are four keys that can store this license information.
To see what I currently have on my system, I print the contents of the plist: Fix ”The tool `xcodebuild` requires Xcode” without installing Xcode, sudo mv xcrun xcrun.old sudo mv xcodebuild xcodebuild.old. 3. Recreate and fill with the necessary content sudo echo -e `#!/bin/shn$@` > xcrun sudo sudo xcodebuild -license Who should display/accept it on all accounts on that particular Mac….