paulguy paulguy - 1 year ago 199
iOS Question

Appcelerator - Xcode EULA has not been accepted. Launch Xcode and accept the license

I am running appcelerator 4.5.0 and xcode 7.2.1 on Mac OS X 10.10.5

Running an iOS app gives me:

[ERROR] : Xcode EULA has not been accepted.
[ERROR] : Launch Xcode and accept the license.

I ran
sudo xcodebuild -license
per: "Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." when using GCC

But the error persists.

I then (per: uninstalled appcelerator by deleting:

/Applications/Aptana Studio 3
/Applications/Titanium Studio
/Application/Appcelerator Studio

and then (per

rm -rf ~/.appcelerator
rm -rf ~/.titanium
sudo npm uninstall -g titanium
sudo npm uninstall -g alloy
sudo npm uninstall -g acs
sudo npm uninstall -g appcelerator

and uninstalled xcode with
sudo /Developer/Library/uninstall-devtools --mode=all

and I deleted from my Applications folder.

After all that I redownloaded xcode via software update, ran
sudo xcodebuild -license
(typing accept at the end), then installed from the site
and ran
appc setup

But still the error persists.

Any ideas on how to fix?

MORE INFO: After reading I believe I have the same issue (still no resolution though).


xcodebuild -sdk iphonesimulator
is successful but if I run:

appc titanium build -p ios -T simulator -Y iphone
I get the same errors as above.

UPDATE based on @andre-m comment (referencing

I already mentioned that I have run
sudo xcodebuild -license
but I also tried:

sudo xcodebuild -license accept
which gives no output and then I still give the error on the build;

sudo xcode-select -r
no output, error;

sudo xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
but still errors;

sudo softwareupdate -l
No new software available.
and then still gives the error;

sudo xcrun cc
clang: error: no input files

UPDATE based on @fokke-appcelerator comment (note these results are the same on both a working and non-working machine):

xcodebuild -checkFirstLaunchStatus; echo $?;

sudo xcodebuild -checkFirstLaunchStatus; echo $?;

Deleted from Applications (again), reinstalled xcode 7.2.1 -> this time from xcode dmg file How to download Xcode 4 / 5 / 6 / 7 and get the DMG file? (previously via Software Update), opened Xcode and was not given any EULA dialog.


Following @fokke-appcelerator's second I logged the exit code, out, and err of (which is located here:
/Users/<my_user>/Library/Application Support/Titanium/mobilesdk/osx/5.2.0.GA/node_modules/ioslib/lib
) and got:
xcodebuild: error: invalid option '-checkFirstLaunchStatus'
because that xcode.js script found an older version of Xcode (4.2.6) that was not removed by
sudo /Developer/Library/uninstall-devtools --mode=all
as it should have.

Removing the old version of Xcode and reinstalling the current version of Xcode and then reinstalling the simulators (Launch Xcode; Select Xcode > Preferences; Select the Downloads icon; Click the Install button next to the desired simulator), and reinstalling Appcelerator ...the problem is now solved.

Answer Source

We check if the EULA has been accepted here:

Which runs:

xcodebuild -checkFirstLaunchStatus

And then checks the exit code.

Could you run the above command yourself and then echo $? to get the exit code? That should echo 1. If that is true, then unfortunately it seems like your Xcode installation has a problem.

Maybe reinstall Xcode and instead of using the terminal to accept the license, just open Xcode.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download