Sha256: 24a6f125a07b2751141fa2b03afef99a163cef32cd99292b541ecbf7c3556d7c

Contents?: true

Size: 1.68 KB

Versions: 107

Compression:

Stored size: 1.68 KB

Contents

module Fastlane
  module Actions
    class ResetSimulatorContentsAction < Action
      def self.run(params)
        if Helper.xcode_at_least?("9")
          UI.user_error!("resetting simulators currently doesn't work with Xcode 9, stay tuned as we are working to add support for all new tools.")
        end

        if params[:ios]
          params[:ios].each do |os_version|
            FastlaneCore::Simulator.reset_all_by_version(os_version: os_version)
          end
        else
          FastlaneCore::Simulator.reset_all
        end
        UI.success('Simulators reset')
      end

      def self.description
        "Shutdown and reset running simulators"
      end

      def self.available_options
        [
          FastlaneCore::ConfigItem.new(key: :ios,
                                       short_option: "-i",
                                       env_name: "FASTLANE_RESET_SIMULATOR_VERSIONS",
                                       description: "Which versions of Simulators you want to reset content and settings, this does not remove/recreate the simulators",
                                       is_string: false,
                                       optional: true,
                                       type: Array)
        ]
      end

      def self.aliases
        ["reset_simulators"]
      end

      def self.output
        nil
      end

      def self.return_value
        nil
      end

      def self.authors
        ["danramteke"]
      end

      def self.is_supported?(platform)
        platform == :ios
      end

      def self.example_code
        [
          'reset_simulator_contents'
        ]
      end

      def self.category
        :misc
      end
    end
  end
end

Version data entries

107 entries across 107 versions & 1 rubygems

Version Path
fastlane-2.57.0.beta.20170914010003 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.57.0.beta.20170913010002 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.56.0 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.56.0.beta.20170912010003 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.56.0.beta.20170911010003 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.56.0.beta.20170910010002 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.56.0.beta.20170909010003 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.56.0.beta.20170908010003 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.56.0.beta.20170907010003 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.56.0.beta.20170906010003 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.56.0.beta.20170905010003 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.56.0.beta.20170904010003 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.56.0.beta.20170903010003 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.56.0.beta.20170902010003 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.56.0.beta.20170901010002 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.55.0 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.55.0.beta.20170831010002 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.54.4 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.55.0.beta.20170830010003 fastlane/lib/fastlane/actions/reset_simulator_contents.rb
fastlane-2.55.0.beta.20170829010003 fastlane/lib/fastlane/actions/reset_simulator_contents.rb