Class: Fastlane::Actions::QuitCoreSimulatorServiceAction
- Inherits:
-
Action
- Object
- Action
- Fastlane::Actions::QuitCoreSimulatorServiceAction
- Defined in:
- lib/fastlane/plugin/test_center/actions/quit_core_simulator_service.rb
Documentation collapse
- .authors ⇒ Object
- .category ⇒ Object
-
.description ⇒ Object
:nocov:.
- .details ⇒ Object
- .is_supported?(platform) ⇒ Boolean
Class Method Summary collapse
Class Method Details
.authors ⇒ Object
30 31 32 |
# File 'lib/fastlane/plugin/test_center/actions/quit_core_simulator_service.rb', line 30 def self. ["lyndsey-ferguson/@lyndseydf"] end |
.category ⇒ Object
34 35 36 |
# File 'lib/fastlane/plugin/test_center/actions/quit_core_simulator_service.rb', line 34 def self.category :testing end |
.description ⇒ Object
:nocov:
21 22 23 |
# File 'lib/fastlane/plugin/test_center/actions/quit_core_simulator_service.rb', line 21 def self.description "📲 Force-quits the com.apple.CoreSimulator.CoreSimulatorService to fix mysterious iOS Simulator issues." end |
.details ⇒ Object
25 26 27 28 |
# File 'lib/fastlane/plugin/test_center/actions/quit_core_simulator_service.rb', line 25 def self.details "Sometimes the com.apple.CoreSimulator.CoreSimulatorService can hang. " \ "Use this action to force-quit it." end |
.is_supported?(platform) ⇒ Boolean
38 39 40 |
# File 'lib/fastlane/plugin/test_center/actions/quit_core_simulator_service.rb', line 38 def self.is_supported?(platform) platform == :ios end |
.run(params) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/fastlane/plugin/test_center/actions/quit_core_simulator_service.rb', line 4 def self.run(params) launchctl_list_count = 0 commands = [] while Actions.sh('launchctl list | grep com.apple.CoreSimulator.CoreSimulatorService || true', log: false) != '' UI.crash!('Unable to quit com.apple.CoreSimulator.CoreSimulatorService after 10 tries') if (launchctl_list_count += 1) > 10 commands << Actions.sh('launchctl remove com.apple.CoreSimulator.CoreSimulatorService &> /dev/null || true', log: false) UI.verbose('Waiting for com.apple.CoreSimulator.CoreSimulatorService to quit') sleep(0.5) end commands end |