xcode windows




Xcode-Install additional required components using command line (4)

At least on XCode 9.2, you could use:

sudo xcodebuild -runFirstLaunch

to accept the agreement and install additional components.

I recently got a used Mac with Mountain Lion on it. I don't know of the admin password or anything, but I do know how to run a command line.

So here's what I am stuck on:

When I click install, it asks me for my username and password (which I don't know of)

I want to install this via single-user mode (Cmd+S on Startup), which I accepted the license using it.

Do you guys know how I could achieve this?


Here's what I ended up doing. I went into recovery mode (CMD+R on startup), then to Terminal. I typed in

resetpassword

which then brought up a dialog of where I can select the user and set the password.

I then set the root password. Now when I can enter an admin password, I type in "root" and the password I set.

I got Xcode to load finally!


The commandline way to install required components is:

/Applications/Xcode.app/Contents/MacOS/Xcode -installComponents

Xcode 5.1.1 have a new argument:

> xcode -installComponents






macos