lib/snapshot/fixes/simulator_zoom_fix.rb in snapshot-1.8.0 vs lib/snapshot/fixes/simulator_zoom_fix.rb in snapshot-1.9.0
- old
+ new
@@ -5,21 +5,18 @@
# Issue: https://github.com/fastlane/snapshot/issues/249
# Radar: https://openradar.appspot.com/radar?id=6127019184095232
class SimulatorZoomFix
def self.patch
- # First we need to kill the simulator
- Snapshot.kill_simulator
+ Snapshot.kill_simulator # First we need to kill the simulator
UI.message "Patching '#{config_path}' to scale simulator to 100%"
FastlaneCore::Simulator.all.each do |simulator|
simulator_name = simulator.name.tr("\s", "-")
key = "SimulatorWindowLastScale-com.apple.CoreSimulator.SimDeviceType.#{simulator_name}"
- command = "defaults write '#{config_path}' '#{key}' '1.0'"
- puts command.yellow if $debug
- `#{command}`
+ Helper.backticks("defaults write '#{config_path}' '#{key}' '1.0'", print: $verbose)
end
end
def self.config_path
File.join(File.expand_path("~"), "Library", "Preferences", "com.apple.iphonesimulator.plist")