lib/xcode/install.rb in xcode-install-2.0.8 vs lib/xcode/install.rb in xcode-install-2.0.9
- old
+ new
@@ -466,10 +466,16 @@
def uuid
@uuid ||= plist_entry(':DVTPlugInCompatibilityUUID')
end
def downloadable_index_url
- @downloadable_index_url ||= "https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/index-#{bundle_version}-#{uuid}.dvtdownloadableindex"
+ @downloadable_index_url ||= begin
+ if Gem::Version.new(version) >= Gem::Version.new('8.1')
+ "https://devimages-cdn.apple.com/downloads/xcode/simulators/index-#{bundle_version}-#{uuid}.dvtdownloadableindex"
+ else
+ "https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/index-#{bundle_version}-#{uuid}.dvtdownloadableindex"
+ end
+ end
end
def approve_license
license_path = "#{@path}/Contents/Resources/English.lproj/License.rtf"
license_id = IO.read(license_path).match(/\bEA\d{4}\b/)