A few quickies that have come in handy over the last few days.
Check the active version of Xcode:
Show the path to the currently active Xcode install.
You can switch the install, which is very convenient when you’re running both release and pre-release versions of the IDE.
sudo xcode-select -s path
View installed SDKs:
List all available SDKs for the active Xcode version. This list varies by install. For example, here is the results for my Xcode 6.4 beta. This is different from my Xcode 6.3 release, which supports iOS 8.3 and not iOS 8.4. All the details here will probably change on Monday with WWDC.
Check default OS build versions:
These commands show the versions each sdk will normally build to.
xcodebuild -version -sdk iphoneos ProductVersion xcodebuild -version -sdk macosx ProductVersion
Show SDK paths:
These retrieve the path to the selected Xcode’s SDK.
xcrun -show-sdk-path -sdk iphoneos xcrun -show-sdk-path -sdk macosx
Or for the platform (higher up in the folder from the SDK), use -show-sdk-platform-path.
Retrieve Xcode Plugin UUID:
defaults read /Applications/Xcode.app/Contents/Info DVTPlugInCompatibilityUUID
When you build a custom plugin, add the result to the plugin’s Info.plist in the DVTPlugInCompatibilityUUIDs array.