Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the path of latest SDK available on Mac

Tags:

xcode

macos

I know that in order to get xcode install directory from command line I have to use xcode-select -print-path. The result is something like: /Applications/Xcode.app/Contents/Developer

Is there any command to get latest SDK folder? I need as result something like: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/

If it's not possible to get the SDK complete path I need at least SDK number and I'll try to build the path.

like image 236
Mircea Ispas Avatar asked Sep 11 '13 12:09

Mircea Ispas


People also ask

Where can I find sdk on Mac?

The location of the folder is located in the text box near the top that says “Android SDK Location”. By default the Android SDK location is stored at “/Users/[USER]/Library/Android/sdk” or at “/Library/Android/sdk/”.

How set sdk location Mac?

For macOS, start Android Studio, then click Android Studio —> Preferences menu item. Select Appearance & Behavior —> System Settings —> Android SDK menu item in the popup window left side. On the window right side, click the Edit link after the Android SDK Location text box, it will open the SDK Setup dialog.

What is sdk in Mac?

A software development kit (SDK) provides a set of files to build applications for a target platform, and defines the actual location of those files on the target platform or an intermediate platform that supports the target platform (for example, Mac OS X provides SDKs for iOS).


1 Answers

The easiest way I found so far is:

xcrun --show-sdk-path
like image 75
Ruslan Ulanov Avatar answered Sep 19 '22 19:09

Ruslan Ulanov