plu / simctl

Ruby interface to xcrun simctl
http://www.rubydoc.info/gems/simctl
MIT License
104 stars 19 forks source link

Latest iOS incorrect #12

Closed stowy closed 7 years ago

stowy commented 7 years ago

After installing XCode 8.1, when we do SimCtl::Runtime.latest(:iOS) we get iOS 8.4, where we should get iOS 10.1.

Any ideas why this is?

plu commented 7 years ago

Which version are you using? I thought I had fixed that in 1.5.7

stowy commented 7 years ago

Version 2.6.7

Here is a console output:

distbuild-osx-coremobile-pro1:~ builduser$ gem -v simctl
2.6.7
distbuild-osx-coremobile-pro1:~ builduser$ irb
2.2.2 :001 > require 'naturally'
 => true 
2.2.2 :002 > require 'simctl'
/usr/local/rvm/gems/ruby-2.2.2/gems/simctl-1.5.4/lib/simctl/command/launch.rb:8: warning: Insecure world writable dir /usr/local/rvm/gems/ruby-2.2.2/bin in PATH, mode 040777
 => true 
2.2.2 :003 > Naturally.sort_by(SimCtl.list_runtimes.where(name: %r|iOS|i), :version).last
 => #<SimCtl::Runtime:0x007fd87415db88 @buildversion="14B72", @availability="(available)", @name="iOS 10.1", @identifier="com.apple.CoreSimulator.SimRuntime.iOS-10-1", @version="10.1"> 
2.2.2 :004 > Naturally.sort_by(SimCtl.list_runtimes.where(name: %r|iOS|i), :version).map { |r| r.name }
 => ["iOS 8.3", "iOS 8.4", "iOS 10.1"] 
2.2.2 :005 > SimCtl::Runtime.latest(:iOS).name
 => "iOS 8.4" 
2.2.2 :006 > SimCtl::Runtime.latest(:iOS)
 => #<SimCtl::Runtime:0x007fd8758ba4e8 @buildversion="12H141", @availability="(available)", @name="iOS 8.4", @identifier="com.apple.CoreSimulator.SimRuntime.iOS-8-4", @version="8.4"> 
stowy commented 7 years ago

My bad, i just checked the version again and it was 1.5.7. Updated and all is fixed. Thanks!