xcpretty / xcode-install

🔽 Install and update your Xcodes
https://fastlane.tools
MIT License
2.59k stars 243 forks source link

9.3 beta listed as 9.3 and therefore installed #272

Open pronebird opened 6 years ago

pronebird commented 6 years ago

AFAIK Xcode 9.3 is now available as a stable release, I had 9.3-beta installed. xcversion says 9.3 is installed (wat?).

$xcversion --version
2.3.1
$ xcversion update
$ xcversion list
4.3 for Lion
4.3.1 for Lion
4.3.2 for Lion
4.3.3 for Lion
4.4
4.4.1
4.5
4.5.1
4.5.2
4.6
4.6.1
4.6.2
4.6.3
5
5.0.1
5.0.2
5.1
5.1.1
6.0.1
6.1
6.1.1
6.2
6.3
6.3.1
6.3.2
6.4
7
7.0.1
7.1
7.1.1
7.2
7.2.1
7.3
7.3.1
8
8.1
8.2
8.2.1
8.3
8.3.1
8.3.2
8.3.3
9
9.0.1
9.1
9.2 (installed)
9.3 (installed)
9.4 beta
$ plutil -p /Applications/Xcode-9.3.app/Contents/Info.plist | grep DT
  "DTCompiler" => "com.apple.compilers.llvm.clang.1_0"
  "DTPlatformBuild" => "9Q127m"
  "DTPlatformVersion" => "GM"
  "DTSDKBuild" => "17E158"
  "DTSDKName" => "macosx10.13internal"
  "DTXcode" => "0930"
  "DTXcodeBuild" => "9Q127m"
timsutton commented 6 years ago

We should be using the contents of Contents/Resources/LicenseInfo.plist within Xcode bundles to programatically determine whether an installed Xcode is a beta or not.

Xcode 9.4's looks like this, for example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>licenseID</key>
    <string>EA1478</string>
    <key>licenseType</key>
    <string>Beta</string>
</dict>
</plist>