From 207f83e3aedbc3f05c69abe662d3644cf05edc8a Mon Sep 17 00:00:00 2001 From: Joshua Moody Date: Thu, 24 Mar 2016 14:04:08 +0100 Subject: [PATCH 1/3] Simctl: an interface to simctl --- lib/run_loop.rb | 2 +- lib/run_loop/simctl.rb | 89 ++++++++++++++++++++++++++++++++++ lib/run_loop/simctl/plists.rb | 20 -------- spec/lib/simctl/plists_spec.rb | 16 ------ spec/lib/simctl_spec.rb | 89 ++++++++++++++++++++++++++++++++++ 5 files changed, 179 insertions(+), 37 deletions(-) create mode 100644 lib/run_loop/simctl.rb delete mode 100644 lib/run_loop/simctl/plists.rb delete mode 100644 spec/lib/simctl/plists_spec.rb create mode 100644 spec/lib/simctl_spec.rb diff --git a/lib/run_loop.rb b/lib/run_loop.rb index 0566966d..c6f92021 100644 --- a/lib/run_loop.rb +++ b/lib/run_loop.rb @@ -31,7 +31,7 @@ require 'run_loop/host_cache' require 'run_loop/patches/awesome_print' require 'run_loop/core_simulator' -require 'run_loop/simctl/plists' +require "run_loop/simctl" require 'run_loop/template' require "run_loop/locale" require "run_loop/language" diff --git a/lib/run_loop/simctl.rb b/lib/run_loop/simctl.rb new file mode 100644 index 00000000..28e24407 --- /dev/null +++ b/lib/run_loop/simctl.rb @@ -0,0 +1,89 @@ +module RunLoop + + # @!visibility private + # An interface to the `simctl` command line tool for CoreSimulator. + # + # Replacement for SimControl. + class Simctl + + # @!visibility private + DEFAULTS = { + :timeout => RunLoop::Environment.ci? ? 90 : 30, + :log_cmd => true + } + + # @!visibility private + SIMCTL_PLIST_DIR = lambda { + dirname = File.dirname(__FILE__) + joined = File.join(dirname, '..', '..', 'plists', 'simctl') + File.expand_path(joined) + }.call + + # @!visibility private + def self.uia_automation_plist + File.join(SIMCTL_PLIST_DIR, 'com.apple.UIAutomation.plist') + end + + # @!visibility private + def self.uia_automation_plugin_plist + File.join(SIMCTL_PLIST_DIR, 'com.apple.UIAutomationPlugIn.plist') + end + + # @!visibility private + attr_accessor :device + + # @!visibility private + # + # @param [RunLoop::Device] device Cannot be nil. + def initialize(device) + @device = device + end + + # @!visibility private + def to_s + "#" + end + + # @!visibility private + def inspect + to_s + end + + # @!visibility private + # + # This method is not supported on Xcode < 7 - returns nil. + # + # @param [String] bundle_id The CFBundleIdentifier of the app. + # @return [String] The path to the .app bundle if it exists; nil otherwise. + def app_container(bundle_id) + return nil if !xcode.version_gte_7? + cmd = ["simctl", "get_app_container", device.udid, bundle_id] + hash = execute(cmd, DEFAULTS) + + exit_status = hash[:exit_status] + if exit_status != 0 + nil + else + hash[:out].strip + end + end + + private + + # @!visibility private + def execute(array, options) + merged = DEFAULTS.merge(options) + xcrun.exec(array, merged) + end + + # @!visibility private + def xcrun + @xcrun ||= RunLoop::Xcrun.new + end + + # @!visibility private + def xcode + @xcode ||= RunLoop::Xcode.new + end + end +end \ No newline at end of file diff --git a/lib/run_loop/simctl/plists.rb b/lib/run_loop/simctl/plists.rb deleted file mode 100644 index 0b08062b..00000000 --- a/lib/run_loop/simctl/plists.rb +++ /dev/null @@ -1,20 +0,0 @@ -module RunLoop - module Simctl - class Plists - - SIMCTL_PLIST_DIR = lambda { - dirname = File.dirname(__FILE__) - joined = File.join(dirname, '..', '..', '..', 'plists', 'simctl') - File.expand_path(joined) - }.call - - def self.uia_automation_plist - File.join(SIMCTL_PLIST_DIR, 'com.apple.UIAutomation.plist') - end - - def self.uia_automation_plugin_plist - File.join(SIMCTL_PLIST_DIR, 'com.apple.UIAutomationPlugIn.plist') - end - end - end -end diff --git a/spec/lib/simctl/plists_spec.rb b/spec/lib/simctl/plists_spec.rb deleted file mode 100644 index ed624f46..00000000 --- a/spec/lib/simctl/plists_spec.rb +++ /dev/null @@ -1,16 +0,0 @@ -describe RunLoop::Simctl::Plists do - - it 'has a constant that points to plist dir' do - dir = RunLoop::Simctl::Plists::SIMCTL_PLIST_DIR - expect(Dir.exist?(dir)).to be_truthy - end - - it 'returns uia plist path' do - expect(File.exist?(RunLoop::Simctl::Plists.uia_automation_plist)).to be_truthy - end - - it 'returns uia plugin plist path' do - expect(File.exist?(RunLoop::Simctl::Plists.uia_automation_plugin_plist)).to be_truthy - end - -end diff --git a/spec/lib/simctl_spec.rb b/spec/lib/simctl_spec.rb new file mode 100644 index 00000000..094e9c45 --- /dev/null +++ b/spec/lib/simctl_spec.rb @@ -0,0 +1,89 @@ + +describe RunLoop::Simctl do + let(:device) { Resources.shared.default_simulator } + let(:simctl) { RunLoop::Simctl.new(device) } + let(:xcrun) { RunLoop::Xcrun.new } + let(:xcode) { RunLoop::Xcode.new } + let(:defaults) { RunLoop::Simctl::DEFAULTS } + + it "has a constant that points to plist dir" do + dir = RunLoop::Simctl::SIMCTL_PLIST_DIR + expect(Dir.exist?(dir)).to be_truthy + end + + it "returns uia plist path" do + expect(File.exist?(RunLoop::Simctl.uia_automation_plist)).to be_truthy + end + + it "returns uia plugin plist path" do + expect(File.exist?(RunLoop::Simctl.uia_automation_plugin_plist)).to be_truthy + end + + it ".new" do + actual = simctl.device + expect(simctl.instance_variable_get(:@device)).to be == actual + end + + describe "#app_container" do + + let(:bundle_id) { "sh.calaba.LPTestTarget" } + let(:cmd) { ["simctl", "get_app_container", device.udid, bundle_id] } + let(:hash) do + { + :pid => 1, + :out => "path/to/My.app#{$-0}", + :exit_status => 0 + } + end + + before do + expect(simctl).to receive(:xcode).and_return(xcode) + end + + describe "Xcode >= 7" do + before do + expect(xcode).to receive(:version_gte_7?).and_return(true) + end + + it "app is installed" do + expect(simctl).to receive(:execute).with(cmd, defaults).and_return(hash) + + expect(simctl.app_container(bundle_id)).to be == hash[:out].strip + end + + it "app is not installed" do + hash[:exit_status] = 1 + expect(simctl).to receive(:execute).with(cmd, defaults).and_return(hash) + expect(simctl.app_container(bundle_id)).to be == nil + end + end + + it "Xcode < 7" do + expect(xcode).to receive(:version_gte_7?).and_return(false) + + expect(simctl.app_container(bundle_id)).to be == nil + end + end + + it "#execute" do + options = {:a => :b} + merged = RunLoop::Simctl::DEFAULTS.merge(options) + cmd = ["simctl", "subcommand"] + expect(simctl).to receive(:xcrun).and_return(xcrun) + expect(xcrun).to receive(:exec).with(cmd, merged).and_return({}) + + expect(simctl.send(:execute, cmd, options)).to be == {} + end + + it "#xcrun" do + actual = simctl.send(:xcrun) + expect(actual).to be_a_kind_of(RunLoop::Xcrun) + expect(simctl.instance_variable_get(:@xcrun)).to be == actual + end + + it "#xcode" do + actual = simctl.send(:xcode) + expect(actual).to be_a_kind_of(RunLoop::Xcode) + expect(simctl.instance_variable_get(:@xcode)).to be == actual + end +end \ No newline at end of file From cb20ce2aa1b8bd8ead4c70e4e723b56fbd7e3ea2 Mon Sep 17 00:00:00 2001 From: Joshua Moody Date: Thu, 24 Mar 2016 17:07:39 +0100 Subject: [PATCH 2/3] CoreSim#installed_app_bundle_dir uses simctl to check On Xcode 7 - Xcode 6 behavior is unchanged. --- lib/run_loop/core_simulator.rb | 11 +- spec/lib/core_simulator_spec.rb | 153 +++++++++--------- .../data/Library/.localized | 0 .../data/Library/Caches/.gitkeep | 0 .../Preferences/.GlobalPreferences.plist | Bin 288 -> 0 bytes .../Preferences/com.apple.UIAutomation.plist | Bin 69 -> 0 bytes .../device.plist | 16 -- .../CalSmoke-cal.app/CalSmoke-cal | 0 .../CalSmoke-cal.app/Info.plist | Bin 1901 -> 0 bytes .../CalSmoke-cal.app/PkgInfo | 1 - .../en.lproj/InfoPlist.strings | Bin 42 -> 0 bytes .../Preferences/.GlobalPreferences.plist | 1 - .../Preferences/com.apple.PeoplePicker.plist | 1 - .../data/Library/Caches/.gitkeep | 0 .../device.plist | 16 -- 15 files changed, 85 insertions(+), 114 deletions(-) delete mode 100644 spec/resources/CoreSimulator/8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503/data/Library/.localized delete mode 100644 spec/resources/CoreSimulator/8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503/data/Library/Caches/.gitkeep delete mode 100644 spec/resources/CoreSimulator/8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503/data/Library/Preferences/.GlobalPreferences.plist delete mode 100644 spec/resources/CoreSimulator/8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503/data/Library/Preferences/com.apple.UIAutomation.plist delete mode 100644 spec/resources/CoreSimulator/8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503/device.plist delete mode 100755 spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/CalSmoke-cal.app/CalSmoke-cal delete mode 100644 spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/CalSmoke-cal.app/Info.plist delete mode 100644 spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/CalSmoke-cal.app/PkgInfo delete mode 100644 spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/CalSmoke-cal.app/en.lproj/InfoPlist.strings delete mode 120000 spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/Library/Preferences/.GlobalPreferences.plist delete mode 120000 spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/Library/Preferences/com.apple.PeoplePicker.plist delete mode 100644 spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Library/Caches/.gitkeep delete mode 100644 spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/device.plist diff --git a/lib/run_loop/core_simulator.rb b/lib/run_loop/core_simulator.rb index 2af879fb..cd5ddb88 100644 --- a/lib/run_loop/core_simulator.rb +++ b/lib/run_loop/core_simulator.rb @@ -744,15 +744,20 @@ def same_sha1_as_installed? def installed_app_bundle_dir sim_app_dir = device_applications_dir return nil if !File.exist?(sim_app_dir) - Dir.glob("#{sim_app_dir}/**/*.app").find do |path| - RunLoop::App.new(path).bundle_identifier == app.bundle_identifier + + if xcode.version_gte_7? + simctl = RunLoop::Simctl.new(device) + simctl.app_container(app.bundle_identifier) + else + Dir.glob("#{sim_app_dir}/**/*.app").find do |path| + RunLoop::App.new(path).bundle_identifier == app.bundle_identifier + end end end # 1. Does nothing if the app is not installed. # 2. Does nothing if the app the same as the app that is installed # 3. Installs app if it is different from the installed app - # def ensure_app_same installed_app_bundle = installed_app_bundle_dir diff --git a/spec/lib/core_simulator_spec.rb b/spec/lib/core_simulator_spec.rb index 31572116..b1460481 100644 --- a/spec/lib/core_simulator_spec.rb +++ b/spec/lib/core_simulator_spec.rb @@ -296,6 +296,8 @@ let(:device) { RunLoop::Device.new('iPhone 5s', '8.1', 'A08334BE-77BD-4A2F-BA25-A0E8251A1A80') } let(:core_sim) { RunLoop::CoreSimulator.new(device, app) } + let(:simctl) { RunLoop::Simctl.new(device) } + let(:xcode) { RunLoop::Xcode.new } describe '#uninstall_app_and_sandbox' do it 'does nothing if the app is not installed' do @@ -436,6 +438,70 @@ end end + describe "#installed_app_bundle_dir" do + let(:app_dir) do + path = File.join(Resources.shared.local_tmp_dir, "Containers/Bundle/Application") + FileUtils.mkdir_p(path) + path + end + + let(:bundle_id) { app.bundle_identifier } + + before do + expect(core_sim).to receive(:device_applications_dir).and_return(app_dir) + allow(core_sim).to receive(:xcode).and_return(xcode) + end + + it "device applications dir does not exist" do + expect(File).to receive(:exist?).with(app_dir).and_return(false) + + expect(core_sim.send(:installed_app_bundle_dir)).to be == nil + end + + describe "Xcode >= 7" do + + before do + expect(xcode).to receive(:version_gte_7?).and_return(true) + end + + it "app installed" do + expect(RunLoop::Simctl).to receive(:new).with(device).and_return(simctl) + expect(simctl).to receive(:app_container).with(bundle_id).and_return(:path) + + expect(core_sim.send(:installed_app_bundle_dir)).to be == :path + end + + it "app not installed" do + expect(RunLoop::Simctl).to receive(:new).with(device).and_return(simctl) + expect(simctl).to receive(:app_container).with(bundle_id).and_return(nil) + + expect(core_sim.send(:installed_app_bundle_dir)).to be == nil + end + end + + describe "Xcode < 7" do + let(:glob) { "#{app_dir}/**/*.app" } + + before do + expect(xcode).to receive(:version_gte_7?).and_return(false) + end + + it "app not installed" do + expect(Dir).to receive(:glob).with(glob).and_return([]) + + expect(core_sim.send(:installed_app_bundle_dir)).to be == nil + end + + it "app is installed" do + FileUtils.cp_r(app.path, app_dir) + + actual = core_sim.send(:installed_app_bundle_dir) + expected = "#{app_dir}/#{File.basename(app.path)}" + expect(actual).to be == expected + end + end + end + describe '#app_sandbox_dir' do it 'returns nil if there is no app bundle' do expect(core_sim).to receive(:installed_app_bundle_dir).and_return nil @@ -552,19 +618,10 @@ RunLoop::Device.new('iPhone 5s', '8.4', '6386C48A-E029-4C1A-932D-355F652F66B9') end - let(:sdk_71_device_with_app) do - RunLoop::Device.new('iPhone 5s', '7.1', 'B88A172B-CF92-4D3A-8A88-96FF4A6303D3') - end - - let(:sdk_71_device_without_app) do - RunLoop::Device.new('iPhone 5', '7.1', '8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503') - end - before do source = File.join(Resources.shared.resources_dir, 'CoreSimulator') FileUtils.cp_r(source, tmp_dir) - stub_const('RunLoop::CoreSimulator::CORE_SIMULATOR_DEVICE_DIR', - directory) + stub_const('RunLoop::CoreSimulator::CORE_SIMULATOR_DEVICE_DIR', directory) end # Not yet. @@ -586,77 +643,21 @@ # expect(logs.count).to be == 2 # end - - describe '#installed_app_bundle_dir' do - describe 'iOS >= 8' do - it 'app is installed' do - core_sim = RunLoop::CoreSimulator.new(device_with_app, app) - - actual = core_sim.send(:installed_app_bundle_dir) - expect(actual).to be_truthy - expect(File.exist?(actual)).to be_truthy - end - - it 'app is not installed' do - core_sim = RunLoop::CoreSimulator.new(device_without_app, app) - - actual = core_sim.send(:installed_app_bundle_dir) - expect(actual).to be_falsey - end - end - - describe 'iOS < 8' do - it 'app is installed' do - core_sim = RunLoop::CoreSimulator.new(sdk_71_device_with_app, app) - - actual = core_sim.send(:installed_app_bundle_dir) - expect(actual).to be_truthy - expect(File.exist?(actual)).to be_truthy - end - - it 'app is not installed' do - core_sim = RunLoop::CoreSimulator.new(sdk_71_device_without_app, app) - - actual = core_sim.send(:installed_app_bundle_dir) - expect(actual).to be_falsey - end - end - end - describe '#app_sandbox_dir' do + it 'app is installed' do + core_sim = RunLoop::CoreSimulator.new(device_with_app, app) + expect(core_sim).to receive(:installed_app_bundle_dir).and_return("path/My.app") - describe 'iOS >= 8' do - it 'app is installed' do - core_sim = RunLoop::CoreSimulator.new(device_with_app, app) - - actual = core_sim.send(:app_sandbox_dir) - expect(actual).to be_truthy - expect(File.exist?(actual)).to be_truthy - end - - it 'app is not installed' do - core_sim = RunLoop::CoreSimulator.new(device_without_app, app) - - actual = core_sim.send(:app_sandbox_dir) - expect(actual).to be_falsey - end + actual = core_sim.send(:app_sandbox_dir) + expect(actual).to be_truthy + expect(File.exist?(actual)).to be_truthy end - describe 'iOS < 8' do - it 'app is installed' do - core_sim = RunLoop::CoreSimulator.new(sdk_71_device_with_app, app) - - actual = core_sim.send(:app_sandbox_dir) - expect(actual).to be_truthy - expect(File.exist?(actual)).to be_truthy - end - - it 'app is not installed' do - core_sim = RunLoop::CoreSimulator.new(sdk_71_device_without_app, app) + it 'app is not installed' do + core_sim = RunLoop::CoreSimulator.new(device_without_app, app) - actual = core_sim.send(:app_sandbox_dir) - expect(actual).to be_falsey - end + actual = core_sim.send(:app_sandbox_dir) + expect(actual).to be_falsey end end diff --git a/spec/resources/CoreSimulator/8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503/data/Library/.localized b/spec/resources/CoreSimulator/8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503/data/Library/.localized deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/resources/CoreSimulator/8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503/data/Library/Caches/.gitkeep b/spec/resources/CoreSimulator/8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503/data/Library/Caches/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/resources/CoreSimulator/8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503/data/Library/Preferences/.GlobalPreferences.plist b/spec/resources/CoreSimulator/8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503/data/Library/Preferences/.GlobalPreferences.plist deleted file mode 100644 index 915e1f5420db44c27b9218a324eb25eda9c3dbcc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 288 zcmYc)$jK}&F)+Bq$i&PN?O0Hdlj@V7oS2gu2Vp1XrI#kArxu5%=Ea8wuNP2ZWn<^y zMC+6cQE@6%&_`l#-T_m6KOcR8m$^Ra4gpO3e#OD+)?U4X?`3^+?PshSDWL zS&2b;IYF5vK_C;0b$ug(vh#xqN-QQP%+q CAY0@B diff --git a/spec/resources/CoreSimulator/8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503/data/Library/Preferences/com.apple.UIAutomation.plist b/spec/resources/CoreSimulator/8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503/data/Library/Preferences/com.apple.UIAutomation.plist deleted file mode 100644 index e6eebd0e6e6126276eb035796396db594dda0c9c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 69 zcmYc)$jK}&F)+Bu$P_Oi9O~& - - - - UDID - 8DE4DF9B-09A4-4CFF-88E1-C62C88DD1503 - deviceType - com.apple.CoreSimulator.SimDeviceType.iPhone-5 - name - iPhone 5 - runtime - com.apple.CoreSimulator.SimRuntime.iOS-7-1 - state - 1 - - diff --git a/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/CalSmoke-cal.app/CalSmoke-cal b/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/CalSmoke-cal.app/CalSmoke-cal deleted file mode 100755 index e69de29b..00000000 diff --git a/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/CalSmoke-cal.app/Info.plist b/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/CalSmoke-cal.app/Info.plist deleted file mode 100644 index f79b4523befbd701b00316e605332b1392d6bef6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1901 zcmah}-*4MQ9JhUr_XAknZjAm|H;;BuXcL??iPN#swap4ei*spCb!^Xe zx@4m~At7E6AfEQbP@#`VdqM&sA)b%`se%U{5J(df{{TE7c;KAGX&Oz;FTT6)=f3y( ze7@hif~8}}6~*89L7D+^9rVAasdifh{Sf(h+nGtlSn zkTuhA-ozFxs{DYzm_(aMH?0aX+$FS*O+)2-{Ma(G9kQ~P%w}}xmQ1_S%sA)+l(K2N zEtKNg*jQKjqkb?0wGFtAvUQ8F+uKsLEV2m|{gjT%5BpnWqhuzr=8{99U2i2;`4c&L z3Eiw>8x;v%tf4t*!2;H?ixJu07I?9Sw5kgWI$HD1kSl}&!3-`cDN}=9=A1*8lE~3) zYANeg#z&(35rse3PZfrj~tFG`7r#Cwq(v@4s^KK(nfS7ws0 zU0VDpE+wYUzI^Vy%J=W{wWAffEpOhE{bf+_ZBmBeeJQ%T#vX0Gm!X+BcXG z#h@PwN|W*OwL8&pbV4A*EhP~W8yu%EoIAggf=1ENpm*a=c4uhE8Y!B(X6J~mW8KJj zTp~wIO0fxn47Zxli}SA%`#PbLC=ygeoDiZ3aZ8a}M9#{u6Xd?61R0FQ6JAmePKK?d zsRaV7Cnkij7>PFV(`gSs(2Z{^Q~7znhXn(nq9eGbP<4<{H>rG$>x@cxjFe!Z-QSW zl^^?mK+bY-5hcxAJ54^)(&0nfN^Uv3dn&(s`ueta z?><&<@HEe?c34Lpq^7A9wM?1RThvF?ed=rKSL#o?mk!ez8qqHOKK&{E1O0&hi#f~$ znK|Y%bAxf2yUY&rCG#!w9rJ*B$ovgxa0Cp2F%Sc@APw?B1sbS=+u#lGF8Ba^2=0O% z@EQ0V{0RO4|FA>sD4S%{titBm68kp$9=pTdXTM;-XMbjYVIQ*p1`Y)Hz<59kTnOX? vp9H=Nd=vPc>)~Qto`W3XO56r#a5uS4uFl=zwy4I((9J(pX#HD1?w$VtbpCLX diff --git a/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/CalSmoke-cal.app/PkgInfo b/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/CalSmoke-cal.app/PkgInfo deleted file mode 100644 index bd04210f..00000000 --- a/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/CalSmoke-cal.app/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPL???? \ No newline at end of file diff --git a/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/CalSmoke-cal.app/en.lproj/InfoPlist.strings b/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/CalSmoke-cal.app/en.lproj/InfoPlist.strings deleted file mode 100644 index 3967e063f94f2b9de2fdbeb4d90be9963443c793..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 42 dcmYc)$jK}&F)+Bm!2kw~j1ZauMnky_oB)p~1JeKi diff --git a/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/Library/Preferences/.GlobalPreferences.plist b/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/Library/Preferences/.GlobalPreferences.plist deleted file mode 120000 index 4e252029..00000000 --- a/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/Library/Preferences/.GlobalPreferences.plist +++ /dev/null @@ -1 +0,0 @@ -/Users/moody/Library/Developer/CoreSimulator/Devices/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Library/Preferences/.GlobalPreferences.plist \ No newline at end of file diff --git a/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/Library/Preferences/com.apple.PeoplePicker.plist b/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/Library/Preferences/com.apple.PeoplePicker.plist deleted file mode 120000 index e12d0630..00000000 --- a/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Applications/0993A874-63DF-49F1-842C-DC7B6C4D2C2E/Library/Preferences/com.apple.PeoplePicker.plist +++ /dev/null @@ -1 +0,0 @@ -/Users/moody/Library/Developer/CoreSimulator/Devices/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Library/Preferences/com.apple.PeoplePicker.plist \ No newline at end of file diff --git a/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Library/Caches/.gitkeep b/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/data/Library/Caches/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/device.plist b/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/device.plist deleted file mode 100644 index a52456b1..00000000 --- a/spec/resources/CoreSimulator/B88A172B-CF92-4D3A-8A88-96FF4A6303D3/device.plist +++ /dev/null @@ -1,16 +0,0 @@ - - - - - UDID - B88A172B-CF92-4D3A-8A88-96FF4A6303D3 - deviceType - com.apple.CoreSimulator.SimDeviceType.iPhone-5s - name - iPhone 5s - runtime - com.apple.CoreSimulator.SimRuntime.iOS-7-1 - state - 3 - - From fc507916f8f5cc7df3adca93dbf846921697298b Mon Sep 17 00:00:00 2001 From: Joshua Moody Date: Thu, 24 Mar 2016 17:23:13 +0100 Subject: [PATCH 3/3] Docs: mention simctl doctor in CHANGELOG --- CHANGELOG.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce9a9a9e..8563aa36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ ### 2.1.0 +This release fixes a bug that might put the iOS Simulator into a bad state. +An iOS Simulator could potentially have a .app installed in its directory +structure, but the app would not appear in Springboard or be detected by +simctl. We have fixed the bug for Xcode 7. There is no possible fix for +Xcode 6. In order to ensure that your iOS Simulators are in a good shape we +recommend that all users run: + +``` +# Will take ~10 minutes depending on the number of installed simulators. +# +# Don't forget to run this on your CI machines. +# +# You only have to run this command once! +$ DEBUG=1 run-loop simctl doctor +``` + +We apologize for the inconvenience. + * Core.run\_with\_options improve the way AUT and DUT are inferred #414 * Core.detecti\_uia\_strategy given options and RunLoop::Device #413 * DetectAUT.detect\_app\_under\_test #412