Sha256: dbe08d76775bf9eee7ba468999399306e8b84377f4dc26e91627959d3173bf32

Contents?: true

Size: 453 Bytes

Versions: 30

Compression:

Stored size: 453 Bytes

Contents

module SimCtl
  class Command
    module Kill
      # Kills a Simulator instance with the given device
      #
      # @param device [SimCtl::Device] the device to kill
      # @return [void]
      def kill_device(device)
        pid = `ps xww | grep Simulator.app | grep -s #{device.udid} | grep -v grep | awk '{print $1}'`.chomp
        if pid.to_i > 0
          system 'kill', pid
        else
          false
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
simctl-1.6.10 lib/simctl/command/kill.rb
simctl-1.6.8 lib/simctl/command/kill.rb
simctl-1.6.7 lib/simctl/command/kill.rb
simctl-1.6.6 lib/simctl/command/kill.rb
simctl-1.6.5 lib/simctl/command/kill.rb
simctl-1.6.4 lib/simctl/command/kill.rb
simctl-1.6.3 lib/simctl/command/kill.rb
simctl-1.6.2 lib/simctl/command/kill.rb
simctl-1.6.1 lib/simctl/command/kill.rb
simctl-1.6.0 lib/simctl/command/kill.rb
simctl-1.5.8 lib/simctl/command/kill.rb
simctl-1.5.7 lib/simctl/command/kill.rb
simctl-1.5.6 lib/simctl/command/kill.rb
simctl-1.5.5 lib/simctl/command/kill.rb
simctl-1.5.4 lib/simctl/command/kill.rb
simctl-1.5.3 lib/simctl/command/kill.rb
simctl-1.5.2 lib/simctl/command/kill.rb
simctl-1.5.1 lib/simctl/command/kill.rb
simctl-1.5.0 lib/simctl/command/kill.rb
simctl-1.4.1 lib/simctl/command/kill.rb